Skip to content

Commit 4c32173

Browse files
authored
Find and replace all -Wstrict-prototypes violations (#1236)
1 parent abb0bb7 commit 4c32173

File tree

11 files changed

+24
-25
lines changed

11 files changed

+24
-25
lines changed

build/future_function_templates/future-value.c.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ header_comment }}
44

55
future_value_t *
6-
future_value_new ()
6+
future_value_new (void)
77
{
88
return (future_value_t *) bson_malloc0 (sizeof (future_value_t));
99
}

src/kms-message/src/kms_crypto_none.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#ifndef KMS_MESSAGE_ENABLE_CRYPTO
2020

2121
int
22-
kms_crypto_init ()
22+
kms_crypto_init (void)
2323
{
2424
return 0;
2525
}
2626

2727
void
28-
kms_crypto_cleanup ()
28+
kms_crypto_cleanup (void)
2929
{
3030
}
3131

src/kms-message/src/kms_crypto_windows.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static BCRYPT_ALG_HANDLE _algoSHA256 = 0;
4343
static BCRYPT_ALG_HANDLE _algoSHA256Hmac = 0;
4444

4545
int
46-
kms_crypto_init ()
46+
kms_crypto_init (void)
4747
{
4848
if (BCryptOpenAlgorithmProvider (
4949
&_algoSHA256, BCRYPT_SHA256_ALGORITHM, MS_PRIMITIVE_PROVIDER, 0) !=
@@ -63,7 +63,7 @@ kms_crypto_init ()
6363
}
6464

6565
void
66-
kms_crypto_cleanup ()
66+
kms_crypto_cleanup (void)
6767
{
6868
(void) BCryptCloseAlgorithmProvider (_algoSHA256, 0);
6969
(void) BCryptCloseAlgorithmProvider (_algoSHA256Hmac, 0);

src/libmongoc/src/mongoc/mongoc-stream-tls-openssl-bio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ BIO_set_init (BIO *b, int init)
7474
}
7575

7676
BIO_METHOD *
77-
mongoc_stream_tls_openssl_bio_meth_new ()
77+
mongoc_stream_tls_openssl_bio_meth_new (void)
7878
{
7979
BIO_METHOD *meth = NULL;
8080

src/libmongoc/tests/bsonutil/bson-match.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ evaluate_special (bson_matcher_t *matcher,
329329

330330

331331
bson_matcher_t *
332-
bson_matcher_new ()
332+
bson_matcher_new (void)
333333
{
334334
bson_matcher_t *matcher = bson_malloc0 (sizeof (bson_matcher_t));
335335
/* Add default special functions. */

src/libmongoc/tests/mock_server/future-value.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/* clang-format off */
1111

1212
future_value_t *
13-
future_value_new ()
13+
future_value_new (void)
1414
{
1515
return (future_value_t *) bson_malloc0 (sizeof (future_value_t));
1616
}
@@ -601,4 +601,3 @@ future_value_get_const_mongoc_write_concern_ptr (future_value_t *future_value)
601601
BSON_ASSERT (future_value->type == future_value_const_mongoc_write_concern_ptr_type);
602602
return future_value->value.const_mongoc_write_concern_ptr_value;
603603
}
604-

src/libmongoc/tests/mock_server/mock-server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ get_port (mongoc_socket_t *sock);
129129
*/
130130

131131
mock_server_t *
132-
mock_server_new ()
132+
mock_server_new (void)
133133
{
134134
mock_server_t *server =
135135
(mock_server_t *) bson_malloc0 (sizeof (mock_server_t));

src/libmongoc/tests/mock_server/sync-queue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct _sync_queue_t {
2828

2929

3030
sync_queue_t *
31-
q_new ()
31+
q_new (void)
3232
{
3333
sync_queue_t *q = (sync_queue_t *) bson_malloc (sizeof (sync_queue_t));
3434

src/libmongoc/tests/test-conveniences.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static char *gFourMBString;
4646

4747

4848
void
49-
test_conveniences_init ()
49+
test_conveniences_init (void)
5050
{
5151
if (!gConveniencesInitialized) {
5252
_mongoc_array_init (&gTmpBsonArray, sizeof (bson_t *));
@@ -1655,7 +1655,7 @@ init_four_mb_string (void)
16551655

16561656

16571657
const char *
1658-
four_mb_string ()
1658+
four_mb_string (void)
16591659
{
16601660
init_four_mb_string ();
16611661
return gFourMBString;
@@ -1737,7 +1737,7 @@ match_in_array (const bson_t *doc, const bson_t *array, match_ctx_t *ctx)
17371737
}
17381738

17391739
bson_t *
1740-
bson_with_all_types ()
1740+
bson_with_all_types (void)
17411741
{
17421742
bson_t *bson = tmp_bson ("{}");
17431743
bson_oid_t oid;
@@ -1776,7 +1776,7 @@ bson_with_all_types ()
17761776
}
17771777

17781778
const char *
1779-
json_with_all_types ()
1779+
json_with_all_types (void)
17801780
{
17811781
const char *json = "{\n"
17821782
" \"double\": {\n"

src/libmongoc/tests/test-libmongoc.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ print_captured_logs (const char *prefix)
189189
#define DEFAULT_FUTURE_TIMEOUT_MS 10 * 1000
190190

191191
int64_t
192-
get_future_timeout_ms ()
192+
get_future_timeout_ms (void)
193193
{
194194
return test_framework_getenv_int64 ("MONGOC_TEST_FUTURE_TIMEOUT_MS",
195195
DEFAULT_FUTURE_TIMEOUT_MS);
@@ -758,7 +758,7 @@ test_framework_add_user_password_from_env (const char *uri_str)
758758
*--------------------------------------------------------------------------
759759
*/
760760
char *
761-
test_framework_get_compressors ()
761+
test_framework_get_compressors (void)
762762
{
763763
return test_framework_getenv ("MONGOC_TEST_COMPRESSORS");
764764
}
@@ -848,7 +848,7 @@ test_framework_get_ssl (void)
848848
*--------------------------------------------------------------------------
849849
*/
850850
char *
851-
test_framework_get_unix_domain_socket_uri_str ()
851+
test_framework_get_unix_domain_socket_uri_str (void)
852852
{
853853
char *path;
854854
char *test_uri_str;
@@ -1161,7 +1161,7 @@ test_framework_get_uri_str_no_auth (const char *database_name)
11611161
*--------------------------------------------------------------------------
11621162
*/
11631163
char *
1164-
test_framework_get_uri_str ()
1164+
test_framework_get_uri_str (void)
11651165
{
11661166
char *uri_str_no_auth;
11671167
char *uri_str;
@@ -1198,7 +1198,7 @@ test_framework_get_uri_str ()
11981198
*--------------------------------------------------------------------------
11991199
*/
12001200
mongoc_uri_t *
1201-
test_framework_get_uri ()
1201+
test_framework_get_uri (void)
12021202
{
12031203
bson_error_t error = {0};
12041204

@@ -1212,7 +1212,7 @@ test_framework_get_uri ()
12121212
}
12131213

12141214
mongoc_uri_t *
1215-
test_framework_get_uri_multi_mongos_loadbalanced ()
1215+
test_framework_get_uri_multi_mongos_loadbalanced (void)
12161216
{
12171217
char *uri_str_no_auth;
12181218
char *uri_str;
@@ -1489,7 +1489,7 @@ test_framework_set_ssl_opts (mongoc_client_t *client)
14891489
*--------------------------------------------------------------------------
14901490
*/
14911491
mongoc_client_t *
1492-
test_framework_new_default_client ()
1492+
test_framework_new_default_client (void)
14931493
{
14941494
char *test_uri_str = test_framework_get_uri_str ();
14951495
mongoc_client_t *client = test_framework_client_new (test_uri_str, NULL);
@@ -1519,7 +1519,7 @@ test_framework_new_default_client ()
15191519
*--------------------------------------------------------------------------
15201520
*/
15211521
mongoc_client_t *
1522-
test_framework_client_new_no_server_api ()
1522+
test_framework_client_new_no_server_api (void)
15231523
{
15241524
mongoc_uri_t *uri = test_framework_get_uri ();
15251525
mongoc_client_t *client = mongoc_client_new_from_uri (uri);
@@ -1721,7 +1721,7 @@ test_framework_set_pool_ssl_opts (mongoc_client_pool_t *pool)
17211721
*--------------------------------------------------------------------------
17221722
*/
17231723
mongoc_client_pool_t *
1724-
test_framework_new_default_client_pool ()
1724+
test_framework_new_default_client_pool (void)
17251725
{
17261726
mongoc_uri_t *test_uri = test_framework_get_uri ();
17271727
mongoc_client_pool_t *pool =

src/libmongoc/tests/unified/test-diagnostics.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ handle_abort (int signo)
9292
}
9393

9494
void
95-
test_diagnostics_init ()
95+
test_diagnostics_init (void)
9696
{
9797
test_diagnostics_t *td = &diagnostics;
9898
memset (td, 0, sizeof (test_diagnostics_t));

0 commit comments

Comments
 (0)