Skip to content

Commit

Permalink
Fix prototype of functions with no args
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurence Lundblade committed Oct 20, 2023
1 parent 6c5c8e6 commit 9439bef
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion examples/init_keys_ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ free_fixed_test_ec_encryption_key(struct t_cose_key key)
/*
* Public function, see init_keys.h
*/
int check_for_key_allocation_leaks()
int check_for_key_allocation_leaks(void)
{
/* So far no good way to do this for OpenSSL or malloc() in
general in a nice portable way. The PSA version does check so
Expand Down
12 changes: 6 additions & 6 deletions test/t_cose_compute_validate_mac_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int32_t compute_validate_basic_test_alg_mac(int32_t cose_alg)
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_mac_basic_test()
int32_t compute_validate_mac_basic_test(void)
{
int32_t return_value;

Expand Down Expand Up @@ -171,7 +171,7 @@ int32_t compute_validate_mac_basic_test()
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_mac_fail_test()
int32_t compute_validate_mac_fail_test(void)
{
struct t_cose_mac_calculate_ctx mac_ctx;
struct t_cose_mac_validate_ctx validate_ctx;
Expand Down Expand Up @@ -344,7 +344,7 @@ static int size_test(int32_t cose_algorithm_id,
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_get_size_mac_test()
int32_t compute_validate_get_size_mac_test(void)
{
enum t_cose_err_t return_value;
struct t_cose_key key;
Expand Down Expand Up @@ -404,7 +404,7 @@ int32_t compute_validate_get_size_mac_test()
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_known_good_test()
int32_t compute_validate_known_good_test(void)
{
struct t_cose_mac_calculate_ctx mac_ctx;
struct t_cose_mac_validate_ctx validate_ctx;
Expand Down Expand Up @@ -507,7 +507,7 @@ int32_t compute_validate_known_good_test()
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_detached_content_mac_fail_test()
int32_t compute_validate_detached_content_mac_fail_test(void)
{
struct t_cose_mac_calculate_ctx mac_ctx;
struct t_cose_mac_validate_ctx validate_ctx;
Expand Down Expand Up @@ -673,7 +673,7 @@ static int detached_content_size_test(int32_t cose_algorithm_id,
/*
* Public function, see t_cose_compute_validate_mac_test.h
*/
int32_t compute_validate_get_size_detached_content_mac_test()
int32_t compute_validate_get_size_detached_content_mac_test(void)
{
enum t_cose_err_t return_value;
struct t_cose_key key;
Expand Down
6 changes: 3 additions & 3 deletions test/t_cose_sign_verify_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static int32_t sig_fail_test(int32_t cose_alg)
/*
* Public function, see t_cose_sign_verify_test.h
*/
int32_t sign_verify_sig_fail_test()
int32_t sign_verify_sig_fail_test(void)
{
int32_t return_value;
const struct test_case* tc;
Expand All @@ -420,7 +420,7 @@ int32_t sign_verify_sig_fail_test()
/*
* Public function, see t_cose_sign_verify_test.h
*/
int32_t sign_verify_make_cwt_test()
int32_t sign_verify_make_cwt_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
QCBOREncodeContext cbor_encode;
Expand Down Expand Up @@ -783,7 +783,7 @@ static int32_t signing_size_test(int32_t cose_algorithm_id,
/*
* Public function, see t_cose_sign_verify_test.h
*/
int32_t sign_verify_get_size_test()
int32_t sign_verify_get_size_test(void)
{
int32_t return_value;
const struct test_case* tc;
Expand Down
32 changes: 16 additions & 16 deletions test/t_cose_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static const struct q_useful_buf_c s_input_payload = {SZ_CONTENT, sizeof(SZ_CONT
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_self_test()
int32_t short_circuit_self_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -142,7 +142,7 @@ int32_t short_circuit_self_test()
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_self_detached_content_test()
int32_t short_circuit_self_detached_content_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -212,7 +212,7 @@ int32_t short_circuit_self_detached_content_test()
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_verify_fail_test()
int32_t short_circuit_verify_fail_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -325,7 +325,7 @@ int32_t short_circuit_verify_fail_test()
* Public function, see t_cose_test.h
*/
// TODO: name of this tests isn't right.
int32_t short_circuit_signing_error_conditions_test()
int32_t short_circuit_signing_error_conditions_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
enum t_cose_err_t result;
Expand Down Expand Up @@ -406,7 +406,7 @@ int32_t short_circuit_signing_error_conditions_test()
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_make_cwt_test()
int32_t short_circuit_make_cwt_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -542,7 +542,7 @@ int32_t short_circuit_make_cwt_test()
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_decode_only_test()
int32_t short_circuit_decode_only_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -679,7 +679,7 @@ static const uint8_t rfc8152_example_2_1[] = {
/*
* Public function, see t_cose_test.h
*/
int32_t cose_example_test()
int32_t cose_example_test(void)
{
enum t_cose_err_t result;
Q_USEFUL_BUF_MAKE_STACK_UB( signed_cose_buffer, 200);
Expand Down Expand Up @@ -787,7 +787,7 @@ static enum t_cose_err_t run_test_sign_and_verify(uint32_t test_mess_options,


#ifndef T_COSE_DISABLE_SHORT_CIRCUIT_SIGN
int32_t all_header_parameters_test()
int32_t all_header_parameters_test(void)
{
enum t_cose_err_t result;
Q_USEFUL_BUF_MAKE_STACK_UB( signed_cose_buffer, 300);
Expand Down Expand Up @@ -910,7 +910,7 @@ static struct test_case bad_parameters_tests_table[] = {
/*
* Public function, see t_cose_test.h
*/
int32_t bad_parameters_test()
int32_t bad_parameters_test(void)
{
struct test_case *test;
enum t_cose_err_t err;
Expand Down Expand Up @@ -980,7 +980,7 @@ static struct test_case crit_tests_table[] = {
/*
* Public function, see t_cose_test.h
*/
int32_t crit_parameters_test()
int32_t crit_parameters_test(void)
{
struct test_case *test;
enum t_cose_err_t err;
Expand All @@ -1005,7 +1005,7 @@ int32_t crit_parameters_test()
/*
* Public function, see t_cose_test.h
*/
int32_t content_type_test()
int32_t content_type_test(void)
{
struct t_cose_parameters parameters;
struct t_cose_sign1_sign_ctx sign_ctx;
Expand Down Expand Up @@ -1586,7 +1586,7 @@ extern int hash_test_mode;
/*
* Public function, see t_cose_test.h
*/
int32_t short_circuit_hash_fail_test()
int32_t short_circuit_hash_fail_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
enum t_cose_err_t result;
Expand Down Expand Up @@ -1644,7 +1644,7 @@ int32_t short_circuit_hash_fail_test()
/*
* Public function, see t_cose_test.h
*/
int32_t tags_test()
int32_t tags_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
struct t_cose_sign1_verify_ctx verify_ctx;
Expand Down Expand Up @@ -2011,7 +2011,7 @@ int32_t tags_test()
}


int32_t get_size_test()
int32_t get_size_test(void)
{
struct t_cose_sign1_sign_ctx sign_ctx;
QCBOREncodeContext cbor_encode;
Expand Down Expand Up @@ -2117,7 +2117,7 @@ int32_t get_size_test()
/*
* Public function, see t_cose_test.h
*/
int32_t indef_array_and_map_test()
int32_t indef_array_and_map_test(void)
{
enum t_cose_err_t return_value;
#ifdef TODO_CRIT_PARAM_FIXED
Expand Down Expand Up @@ -2165,7 +2165,7 @@ int32_t indef_array_and_map_test()
/*
* Public function, see t_cose_test.h
*/
int32_t crypto_context_test()
int32_t crypto_context_test(void)
{
struct t_cose_sign_sign_ctx sign_ctx;
struct t_cose_sign_verify_ctx verify_ctx;
Expand Down

0 comments on commit 9439bef

Please sign in to comment.