Skip to content

Commit

Permalink
fix: C standard requires prototype (#805)
Browse files Browse the repository at this point in the history
The latest compilers require all C functions to have a prototype to compile,
adds the void prototype to those functions requiring this
  • Loading branch information
dawesc committed Nov 26, 2024
1 parent 42f7af6 commit 9da68bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/aws/cryptosdk/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion source/cipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 9da68bf

Please sign in to comment.