Fix compile warnings about no function prototype

This commit is contained in:
Ian Craggs 2024-04-02 16:06:38 +01:00
parent 6c202d4869
commit 7fabf60235
16 changed files with 31 additions and 31 deletions

View File

@ -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 @@ exit:
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");

View File

@ -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,

View File

@ -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,

View File

@ -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 @@ exit:
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");

View File

@ -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 @@ exit:
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)

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 };

View File

@ -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);

View File

@ -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));

View File

@ -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));

View File

@ -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 @@ exit:
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");

View File

@ -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());

View File

@ -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 @@ exit:
int main(int argc, char** argv)
{
int rc = 0;
int (*tests[])() = {NULL, test1};
int (*tests[])(struct Options) = {NULL, test1};
int i;
unsigned test_i;

View File

@ -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)