From: Uwe Hermann Date: Fri, 17 Jan 2014 19:41:56 +0000 (+0100) Subject: tests: Fix a few warnings. X-Git-Tag: libsigrok-0.3.0~246 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=17794067f96fd2b6f55b49bfcc2ce08e6edf57e5;p=libsigrok.git tests: Fix a few warnings. Fix a bunch of "no previous prototype for ..." warnings exposed by -Wmissing-prototypes. --- diff --git a/tests/check_core.c b/tests/check_core.c index 8bc1d5ae..940afebc 100644 --- a/tests/check_core.c +++ b/tests/check_core.c @@ -21,6 +21,7 @@ #include #include #include "../libsigrok.h" +#include "lib.h" /* * Check various basic init related things. diff --git a/tests/check_main.c b/tests/check_main.c index b2396edc..c4ce1436 100644 --- a/tests/check_main.c +++ b/tests/check_main.c @@ -21,14 +21,7 @@ #include #include #include "../libsigrok.h" - -Suite *suite_core(void); -Suite *suite_driver_all(void); -Suite *suite_input_all(void); -Suite *suite_input_binary(void); -Suite *suite_output_all(void); -Suite *suite_strutil(void); -Suite *suite_version(void); +#include "lib.h" int main(void) { diff --git a/tests/check_strutil.c b/tests/check_strutil.c index f486d765..ad67ef24 100644 --- a/tests/check_strutil.c +++ b/tests/check_strutil.c @@ -20,6 +20,7 @@ #include #include "../libsigrok.h" +#include "lib.h" struct sr_context *sr_ctx; diff --git a/tests/check_version.c b/tests/check_version.c index d217b24c..37cf370f 100644 --- a/tests/check_version.c +++ b/tests/check_version.c @@ -21,6 +21,7 @@ #include #include #include "../libsigrok.h" +#include "lib.h" /* * Check the version number API calls and macros. diff --git a/tests/lib.c b/tests/lib.c index 39c036f6..faffc3a9 100644 --- a/tests/lib.c +++ b/tests/lib.c @@ -24,6 +24,7 @@ #include #include #include "../libsigrok.h" +#include "lib.h" /* Get a libsigrok driver by name. */ struct sr_dev_driver *srtest_driver_get(const char *drivername) diff --git a/tests/lib.h b/tests/lib.h index 4f7e01c2..edb32d75 100644 --- a/tests/lib.h +++ b/tests/lib.h @@ -41,4 +41,12 @@ void srtest_check_samplerate(struct sr_context *sr_ctx, const char *drivername, void srtest_buf_to_file(const char *filename, const uint8_t *buf, uint64_t len); GArray *srtest_get_enabled_logic_probes(const struct sr_dev_inst *sdi); +Suite *suite_core(void); +Suite *suite_driver_all(void); +Suite *suite_input_all(void); +Suite *suite_input_binary(void); +Suite *suite_output_all(void); +Suite *suite_strutil(void); +Suite *suite_version(void); + #endif