Skip to content

Commit

Permalink
Fix compile warnings about no function prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
icraggs committed Apr 2, 2024
1 parent cd3c4cb commit f39dc44
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions test/test1.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion test/test10.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/test11.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/test15.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions test/test2.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2022 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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions test/test3.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions test/test4.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions test/test45.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions test/test5.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 };

Expand Down
4 changes: 2 additions & 2 deletions test/test8.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/test9.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/test95.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/test_connect_destroy.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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");
Expand Down
4 changes: 2 additions & 2 deletions test/test_issue373.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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());
Expand Down
4 changes: 2 additions & 2 deletions test/test_mqtt4async.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -607,7 +607,7 @@ int test2(struct Options options)
int main(int argc, char** argv)
{
int rc = 0;
int (*tests[])() = {NULL, test1, test2};
int (*tests[])(struct Options) = {NULL, test1, test2};
int i;

xml = fopen("TEST-MQTT4sync.xml", "w");
Expand Down
4 changes: 2 additions & 2 deletions test/test_sync_session_present.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions test/thread.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2020 IBM Corp.
* 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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f39dc44

Please sign in to comment.