From: Uwe Hermann Date: Sat, 1 Feb 2014 15:03:22 +0000 (+0100) Subject: Fix more warnings exposed by -Wmissing-prototypes. X-Git-Tag: libsigrokdecode-0.3.0~127 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=b92233847c6a77dfb66ac2eaef3c2ef4ff57640c;p=libsigrokdecode.git Fix more warnings exposed by -Wmissing-prototypes. --- diff --git a/tests/Makefile.am b/tests/Makefile.am index bd0858f..7b2f8d8 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -23,6 +23,7 @@ TESTS = check_main check_PROGRAMS = ${TESTS} check_main_SOURCES = \ $(top_builddir)/libsigrokdecode.h \ + lib.h \ check_main.c \ check_core.c \ check_decoder.c \ diff --git a/tests/check_core.c b/tests/check_core.c index cbbb26f..e5b7b35 100644 --- a/tests/check_core.c +++ b/tests/check_core.c @@ -21,6 +21,7 @@ #include "../libsigrokdecode.h" /* First, to avoid compiler warning. */ #include #include +#include "lib.h" static void setup(void) { diff --git a/tests/check_decoder.c b/tests/check_decoder.c index d62a1eb..527845f 100644 --- a/tests/check_decoder.c +++ b/tests/check_decoder.c @@ -21,6 +21,7 @@ #include "../libsigrokdecode.h" /* First, to avoid compiler warning. */ #include #include +#include "lib.h" static void setup(void) { diff --git a/tests/check_inst.c b/tests/check_inst.c index 87dbe91..fccd2e1 100644 --- a/tests/check_inst.c +++ b/tests/check_inst.c @@ -21,6 +21,7 @@ #include "../libsigrokdecode.h" /* First, to avoid compiler warning. */ #include #include +#include "lib.h" static void setup(void) { diff --git a/tests/check_main.c b/tests/check_main.c index 8c86532..6af3c3f 100644 --- a/tests/check_main.c +++ b/tests/check_main.c @@ -21,11 +21,7 @@ #include "../libsigrokdecode.h" /* First, to avoid compiler warning. */ #include #include - -Suite *suite_core(void); -Suite *suite_decoder(void); -Suite *suite_inst(void); -Suite *suite_session(void); +#include "lib.h" int main(void) { diff --git a/tests/check_session.c b/tests/check_session.c index 53b874b..8a34f32 100644 --- a/tests/check_session.c +++ b/tests/check_session.c @@ -22,6 +22,7 @@ #include "../libsigrokdecode-internal.h" #include #include +#include "lib.h" static void setup(void) { diff --git a/tests/lib.h b/tests/lib.h new file mode 100644 index 0000000..e5609d4 --- /dev/null +++ b/tests/lib.h @@ -0,0 +1,29 @@ +/* + * This file is part of the libsigrokdecode project. + * + * Copyright (C) 2013 Uwe Hermann + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef LIBSIGROKDECODE_TESTS_LIB_H +#define LIBSIGROKDECODE_TESTS_LIB_H + +Suite *suite_core(void); +Suite *suite_decoder(void); +Suite *suite_inst(void); +Suite *suite_session(void); + +#endif