Skip to content

Commit 8270531

Browse files
authored
MONGOCRYPT-783 address C99 standard conformance warnings (#973)
* Address -Wnewline-eof warnings * Address -Wpedantic warnings due to __FUNCTION__ * Address -Wpedantic warnings due to implicit object->function pointer conversion * Address -Wgnu-zero-variadic-macro-arguments warnings * Address -Wpedantic warnings due to stray semicolons * Remove -Wvariadic-macro-arguments-omitted from ENABLE_MORE_WARNINGS_AS_ERRORS
1 parent fd8eef3 commit 8270531

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+224
-202
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,4 +712,3 @@ install (
712712
COMPONENT
713713
Devel
714714
)
715-

kms-message/src/hexlify.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ char *
2121
hexlify (const uint8_t *buf, size_t len);
2222

2323
int
24-
unhexlify (const char *in, size_t len);
24+
unhexlify (const char *in, size_t len);

kms-message/src/kms_azure_request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,4 +216,4 @@ kms_azure_request_unwrapkey_new (const char *host,
216216
ciphertext,
217217
ciphertext_len,
218218
opt);
219-
}
219+
}

kms-message/src/kms_gcp_request.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,4 @@ kms_gcp_request_decrypt_new (const char *host,
283283
ciphertext,
284284
ciphertext_len,
285285
opt);
286-
}
286+
}

kms-message/src/kms_request_opt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ kms_request_opt_set_crypto_hook_sign_rsaes_pkcs1_v1_5 (
8585
{
8686
opt->crypto.sign_rsaes_pkcs1_v1_5 = sign_rsaes_pkcs1_v1_5;
8787
opt->crypto.sign_ctx = sign_ctx;
88-
}
88+
}

kms-message/test/test_kms_assert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define TEST_ERROR(...) \
4545
do { \
4646
TEST_STDERR_PRINTF ( \
47-
"test error %s:%d %s(): ", __FILE__, __LINE__, __FUNCTION__); \
47+
"test error %s:%d %s(): ", __FILE__, __LINE__, __func__); \
4848
TEST_STDERR_PRINTF (__VA_ARGS__); \
4949
TEST_STDERR_PRINTF ("\n"); \
5050
abort (); \
@@ -161,4 +161,4 @@
161161
ASSERT_CONTAINS (_error_str, expect_substring); \
162162
} while (0)
163163

164-
#endif /* TEST_KMS_ASSERT_H */
164+
#endif /* TEST_KMS_ASSERT_H */

kms-message/test/test_kms_azure_online.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,4 @@ main (int argc, char **argv)
257257
kms_message_init ();
258258
test_azure_wrapkey ();
259259
return 0;
260-
}
260+
}

kms-message/test/test_kms_gcp_online.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,4 +247,4 @@ main (int argc, char **argv)
247247
kms_message_init ();
248248
test_gcp ();
249249
return 0;
250-
}
250+
}

kms-message/test/test_kms_online_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ send_kms_request (kms_request_t *req, const char *host)
117117
kms_response_parser_destroy (response_parser);
118118
mongoc_stream_destroy (tls_stream);
119119
return response;
120-
}
120+
}

kms-message/test/test_kms_online_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ connect_with_tls (const char *host,
3232
kms_response_t *
3333
send_kms_request (kms_request_t *req, const char *host);
3434

35-
#endif /* TEST_KMS_ONLINE_UTIL_H */
35+
#endif /* TEST_KMS_ONLINE_UTIL_H */

0 commit comments

Comments
 (0)