From 7fabf60235d421e83e0b9d615c5187a4ed4d1350 Mon Sep 17 00:00:00 2001 From: Ian Craggs Date: Tue, 2 Apr 2024 16:06:38 +0100 Subject: [PATCH] Fix compile warnings about no function prototype --- test/test1.c | 4 ++-- test/test10.c | 2 +- test/test11.c | 4 ++-- test/test15.c | 4 ++-- test/test2.c | 4 ++-- test/test3.c | 4 ++-- test/test4.c | 4 ++-- test/test45.c | 4 ++-- test/test5.c | 4 ++-- test/test8.c | 4 ++-- test/test9.c | 4 ++-- test/test95.c | 4 ++-- test/test_connect_destroy.c | 4 ++-- test/test_issue373.c | 4 ++-- test/test_sync_session_present.c | 4 ++-- test/thread.c | 4 ++-- 16 files changed, 31 insertions(+), 31 deletions(-) diff --git a/test/test1.c b/test/test1.c index bf2c7d056..f092a04c9 100644 --- a/test/test1.c +++ b/test/test1.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2023 IBM Corp., Ian Craggs + * Copyright (c) 2009, 2024 IBM Corp., Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -1171,7 +1171,7 @@ int test6a(struct Options options) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1, test2, test3, test4, test5, test6, test6a}; + int (*tests[])(struct Options) = {NULL, test1, test2, test3, test4, test5, test6, test6a}; int i; xml = fopen("TEST-test1.xml", "w"); diff --git a/test/test10.c b/test/test10.c index 53d61601b..4e8e759b5 100644 --- a/test/test10.c +++ b/test/test10.c @@ -1814,7 +1814,7 @@ int main(int argc, char** argv) { int rc = 0, i; - int (*tests[])() = {NULL, + int (*tests[])(struct Options) = {NULL, test_client_topic_aliases, test_server_topic_aliases, test_subscription_ids, diff --git a/test/test11.c b/test/test11.c index aa26d7f50..91a4529ea 100644 --- a/test/test11.c +++ b/test/test11.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2018 IBM Corp. + * Copyright (c) 2009, 2024 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -2091,7 +2091,7 @@ void trace_callback(enum MQTTASYNC_TRACE_LEVELS level, char* message) int main(int argc, char** argv) { int rc = -1; - int (*tests[])() = {NULL, + int (*tests[])(struct Options) = {NULL, test_client_topic_aliases, test_server_topic_aliases, test_subscription_ids, diff --git a/test/test15.c b/test/test15.c index 22b80ba57..50d659a9f 100644 --- a/test/test15.c +++ b/test/test15.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2022 IBM Corp, Ian Craggs + * Copyright (c) 2009, 2024 IBM Corp, Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -1416,7 +1416,7 @@ int test6a(struct Options options) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1, test2, test3, test4, test5, test6, test6a}; + int (*tests[])(struct Options) = {NULL, test1, test2, test3, test4, test5, test6, test6a}; int i; xml = fopen("TEST-test1.xml", "w"); diff --git a/test/test2.c b/test/test2.c index 0da3d854e..f11fc054d 100644 --- a/test/test2.c +++ b/test/test2.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2023 IBM Corp., Ian Craggs and others + * Copyright (c) 2009, 2024 IBM Corp., Ian Craggs and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -676,7 +676,7 @@ int test2(struct Options options) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1}; + int (*tests[])(struct Options) = {NULL, test1}; int i; #if defined(_WIN32) || defined(_WIN64) diff --git a/test/test3.c b/test/test3.c index 2f6a06097..5987d162b 100644 --- a/test/test3.c +++ b/test/test3.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2022 IBM Corp., Ian Craggs and others + * Copyright (c) 2012, 2024 IBM Corp., Ian Craggs and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -1704,7 +1704,7 @@ int main(int argc, char** argv) { int* numtests = &tests; int rc = 0; - int (*tests[])() = {NULL, test1, test2a_s, test2a_m, test2b, test2c, test3a_s, test3a_m, test3b, test4_s, test4_m, test6, + int (*tests[])(struct Options) = {NULL, test1, test2a_s, test2a_m, test2b, test2c, test3a_s, test3a_m, test3b, test4_s, test4_m, test6, test2e_s /*test5a, test5b,test5c */}; //MQTTClient_nameValue* info; diff --git a/test/test4.c b/test/test4.c index 9c34a9715..f65a8c437 100644 --- a/test/test4.c +++ b/test/test4.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2022 IBM Corp., Ian Craggs + * Copyright (c) 2009, 2024 IBM Corp., Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -1754,7 +1754,7 @@ void trace_callback(enum MQTTASYNC_TRACE_LEVELS level, char* message) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1, test2, test3, test4, test5, test6, test7, test8}; /* indexed starting from 1 */ + int (*tests[])(struct Options) = {NULL, test1, test2, test3, test4, test5, test6, test7, test8}; /* indexed starting from 1 */ MQTTAsync_nameValue* info; int i; diff --git a/test/test45.c b/test/test45.c index f154fa7b5..82f4be0f2 100644 --- a/test/test45.c +++ b/test/test45.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2020 IBM Corp. + * Copyright (c) 2009, 2024 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -2045,7 +2045,7 @@ void trace_callback(enum MQTTASYNC_TRACE_LEVELS level, char* message) int main(int argc, char** argv) { int rc = -1; - int (*tests[])() = {NULL, test1, test2, test3, test4, test5, test6, test7, test8}; /* indexed starting from 1 */ + int (*tests[])(struct Options) = {NULL, test1, test2, test3, test4, test5, test6, test7, test8}; /* indexed starting from 1 */ MQTTAsync_nameValue* info; int i; diff --git a/test/test5.c b/test/test5.c index 61deb1394..bec99be6a 100644 --- a/test/test5.c +++ b/test/test5.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2022 IBM Corp., Ian Craggs + * Copyright (c) 2012, 2024 IBM Corp., Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -2697,7 +2697,7 @@ int main(int argc, char** argv) { int* numtests = &tests; int rc = 0; - int (*tests[])() = + int (*tests[])(struct Options) = { NULL, test1, test2a, test2b, test2c, test2d, test3a, test3b, test4, /* test5a, test5b, test5c, */ test6, test7, test8, test9, test10, test2e }; diff --git a/test/test8.c b/test/test8.c index 2e6d881b9..7375d5c83 100644 --- a/test/test8.c +++ b/test/test8.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2021 IBM Corp., Ian Craggs and others + * Copyright (c) 2012, 2024 IBM Corp., Ian Craggs and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -1399,7 +1399,7 @@ void trace_callback(enum MQTTASYNC_TRACE_LEVELS level, char* message) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1, test2, test3, test4, test5a, test5b, test5c, test6}; /* indexed starting from 1 */ + int (*tests[])(struct Options) = {NULL, test1, test2, test3, test4, test5a, test5b, test5c, test6}; /* indexed starting from 1 */ MQTTAsync_nameValue* info; getopts(argc, argv); diff --git a/test/test9.c b/test/test9.c index 59bbcef7a..3b3a0baa8 100644 --- a/test/test9.c +++ b/test/test9.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2023 IBM Corp., Ian Craggs + * Copyright (c) 2012, 2024 IBM Corp., Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -2690,7 +2690,7 @@ int main(int argc, char** argv) { int* numtests = &tests; int rc = 0; - int (*tests[])() = { NULL, test1, test2, test3, test4, test5, test6, test7, test8, test9, test10}; + int (*tests[])(struct Options) = { NULL, test1, test2, test3, test4, test5, test6, test7, test8, test9, test10}; time_t randtime; srand((unsigned) time(&randtime)); diff --git a/test/test95.c b/test/test95.c index 466334096..d82bdd9f4 100644 --- a/test/test95.c +++ b/test/test95.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2023 IBM Corp., Ian Craggs + * Copyright (c) 2012, 2024 IBM Corp., Ian Craggs * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -2236,7 +2236,7 @@ int main(int argc, char** argv) { int* numtests = &tests; int rc = 0; - int (*tests[])() = { NULL, test1, test2, test3, test4, test5, test6 }; + int (*tests[])(struct Options) = { NULL, test1, test2, test3, test4, test5, test6 }; time_t randtime; srand((unsigned) time(&randtime)); diff --git a/test/test_connect_destroy.c b/test/test_connect_destroy.c index d18508272..e694b85df 100644 --- a/test/test_connect_destroy.c +++ b/test/test_connect_destroy.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2023 IBM Corp. and others + * Copyright (c) 2009, 2024 IBM Corp. and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -382,7 +382,7 @@ int test1(struct Options options) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1}; + int (*tests[])(struct Options) = {NULL, test1}; int i; xml = fopen("TEST-test2.xml", "w"); diff --git a/test/test_issue373.c b/test/test_issue373.c index 14cadc017..1d516ca9c 100644 --- a/test/test_issue373.c +++ b/test/test_issue373.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2012, 2017 IBM Corp. + * Copyright (c) 2012, 2024 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -380,7 +380,7 @@ int main(int argc, char** argv) { int* numtests = &tests; int rc = 0; - int (*tests[])() = { NULL, test_373}; + int (*tests[])(struct Options) = { NULL, test_373}; unsigned int QoS; sprintf(unique, "%u", rand()); diff --git a/test/test_sync_session_present.c b/test/test_sync_session_present.c index 0e7201a7b..3e6da8dbf 100644 --- a/test/test_sync_session_present.c +++ b/test/test_sync_session_present.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2020 IBM Corp. and others + * Copyright (c) 2009, 2024 IBM Corp. and others * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -463,7 +463,7 @@ int test1(struct Options options) int main(int argc, char** argv) { int rc = 0; - int (*tests[])() = {NULL, test1}; + int (*tests[])(struct Options) = {NULL, test1}; int i; unsigned test_i; diff --git a/test/thread.c b/test/thread.c index 4918f8a24..9e6de963a 100644 --- a/test/thread.c +++ b/test/thread.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2023 IBM Corp. + * Copyright (c) 2009, 2024 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 @@ -491,7 +491,7 @@ int test_mutex(struct Options options) int main(int argc, char** argv) { int rc = -1; - int (*tests[])() = {NULL, + int (*tests[])(struct Options) = {NULL, test_mutex, test_sem, #if !defined(_WIN32) && !defined(_WIN64)