From 9da68bf71ee9d906e96111744ee9e87f9b3f59bf Mon Sep 17 00:00:00 2001 From: Christopher Dawes Date: Thu, 21 Nov 2024 08:29:23 +0000 Subject: [PATCH] fix: C standard requires prototype (#805) The latest compilers require all C functions to have a prototype to compile, adds the void prototype to those functions requiring this --- include/aws/cryptosdk/error.h | 2 +- source/cipher.c | 2 +- source/error.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/aws/cryptosdk/error.h b/include/aws/cryptosdk/error.h index 2ab9461f9..a04b1b886 100644 --- a/include/aws/cryptosdk/error.h +++ b/include/aws/cryptosdk/error.h @@ -62,7 +62,7 @@ enum aws_cryptosdk_err { * Implicitly registers error strings for aws-c-common as well. */ AWS_CRYPTOSDK_API -void aws_cryptosdk_load_error_strings(); +void aws_cryptosdk_load_error_strings(void); #ifdef __cplusplus } diff --git a/source/cipher.c b/source/cipher.c index 7af66a9d7..8b433b2a6 100644 --- a/source/cipher.c +++ b/source/cipher.c @@ -470,7 +470,7 @@ static int evp_gcm_encrypt_final(const struct aws_cryptosdk_alg_properties *prop return AWS_ERROR_SUCCESS; } -static inline void flush_openssl_errors() { +static inline void flush_openssl_errors(void) { while (ERR_get_error() != 0) { } } diff --git a/source/error.c b/source/error.c index 4547e05f8..a9f9fc414 100644 --- a/source/error.c +++ b/source/error.c @@ -39,6 +39,6 @@ static const struct aws_error_info error_info[] = { static const struct aws_error_info_list error_info_list = { .error_list = error_info, .count = sizeof(error_info) / sizeof(error_info[0]) }; -void aws_cryptosdk_load_error_strings() { +void aws_cryptosdk_load_error_strings(void) { aws_register_error_info(&error_info_list); }