Module: xenomai-forge
Branch: master
Commit: aa868a1ca48c6f7f79285c9981bb3abd80834be3
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=aa868a1ca48c6f7f79285c9981bb3abd80834be3

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Jul  4 14:52:52 2013 +0200

cobalt: enable -Wmissing-prototypes for all targets

---

 include/cobalt/signal.h           |    2 +
 include/cobalt/stdio.h            |   11 ++++++-
 include/cobalt/syslog.h           |    7 +++-
 lib/cobalt/Makefile.am            |    6 ++--
 lib/cobalt/Makefile.in            |    4 +-
 lib/cobalt/arm/Makefile.am        |    8 ++--
 lib/cobalt/arm/Makefile.in        |    6 ++--
 lib/cobalt/blackfin/Makefile.am   |    8 ++--
 lib/cobalt/blackfin/Makefile.in   |    6 ++--
 lib/cobalt/blackfin/features.c    |    1 +
 lib/cobalt/nios2/Makefile.am      |    8 ++--
 lib/cobalt/nios2/Makefile.in      |    6 ++--
 lib/cobalt/nios2/features.c       |    2 +-
 lib/cobalt/powerpc/Makefile.am    |    8 ++--
 lib/cobalt/powerpc/Makefile.in    |    6 ++--
 lib/cobalt/powerpc/features.c     |    1 +
 lib/cobalt/sh/Makefile.am         |    8 ++--
 lib/cobalt/sh/Makefile.in         |    6 ++--
 lib/cobalt/sigshadow.c            |    1 +
 lib/cobalt/ticks.c                |    1 +
 lib/cobalt/trace.c                |    1 +
 lib/cobalt/x86/Makefile.am        |    8 ++--
 lib/cobalt/x86/Makefile.in        |    6 ++--
 testsuite/clocktest/Makefile.am   |    3 +-
 testsuite/clocktest/Makefile.in   |    3 +-
 testsuite/clocktest/clocktest.c   |   10 +++--
 testsuite/cyclic/Makefile.am      |    2 +-
 testsuite/cyclic/Makefile.in      |    2 +-
 testsuite/latency/Makefile.am     |    3 +-
 testsuite/latency/Makefile.in     |    3 +-
 testsuite/latency/latency.c       |   16 ++++----
 testsuite/switchtest/Makefile.am  |    3 +-
 testsuite/switchtest/Makefile.in  |    3 +-
 testsuite/switchtest/switchtest.c |   16 ++++----
 testsuite/unit/Makefile.am        |   18 +++-------
 testsuite/unit/Makefile.in        |   18 +++-------
 testsuite/unit/arith-noinline.c   |    2 +-
 testsuite/unit/arith-noinline.h   |    2 +-
 testsuite/unit/cond-torture.c     |   54 +++++++++++++++---------------
 testsuite/unit/mutex-torture.c    |   65 +++++++++++++++++--------------------
 testsuite/unit/wakeup-time.c      |    8 ++--
 41 files changed, 176 insertions(+), 176 deletions(-)

diff --git a/include/cobalt/signal.h b/include/cobalt/signal.h
index 0304316..8fa0917 100644
--- a/include/cobalt/signal.h
+++ b/include/cobalt/signal.h
@@ -24,4 +24,6 @@
 #include_next <signal.h>
 #include <cobalt/uapi/signal.h>
 
+int cobalt_sigshadow_handler(int sig, siginfo_t *si, void *ctxt);
+
 #endif /* !_COBALT_SIGNAL_H */
diff --git a/include/cobalt/stdio.h b/include/cobalt/stdio.h
index 34ed470..2af2265 100644
--- a/include/cobalt/stdio.h
+++ b/include/cobalt/stdio.h
@@ -32,9 +32,18 @@ extern "C" {
 COBALT_DECL(int, vfprintf(FILE *stream, const char *fmt, va_list args));
 
 #ifdef CONFIG_XENO_FORTIFY
+
 COBALT_DECL(int, __vfprintf_chk(FILE *stream, int level,
                                const char *fmt, va_list ap));
-#endif
+
+COBALT_DECL(int, __vprintf_chk(int flag,
+                              const char *fmt, va_list ap));
+
+COBALT_DECL(int, __printf_chk(int flag, const char *fmt, ...));
+
+COBALT_DECL(int, __fprintf_chk(FILE *fp, int flag, const char *fmt, ...));
+
+#endif /* CONFIG_XENO_FORTIFY */
 
 COBALT_DECL(int, vprintf(const char *fmt, va_list args));
 
diff --git a/include/cobalt/syslog.h b/include/cobalt/syslog.h
index a594b8e..79de374 100644
--- a/include/cobalt/syslog.h
+++ b/include/cobalt/syslog.h
@@ -34,9 +34,14 @@ COBALT_DECL(void, vsyslog(int priority,
                          const char *fmt, va_list ap));
 
 #ifdef CONFIG_XENO_FORTIFY
+
 COBALT_DECL(void, __vsyslog_chk(int priority, int level,
                                const char *fmt, va_list ap));
-#endif
+
+COBALT_DECL(void, __syslog_chk(int pri, int flag,
+                              const char *fmt, ...));
+
+#endif /* CONFIG_XENO_FORTIFY */
 
 #ifdef __cplusplus
 }
diff --git a/lib/cobalt/Makefile.am b/lib/cobalt/Makefile.am
index c408d8e..dbe57e3 100644
--- a/lib/cobalt/Makefile.am
+++ b/lib/cobalt/Makefile.am
@@ -35,9 +35,9 @@ libcobalt_la_SOURCES =                \
        trace.c                 \
        wrappers.c
 
-libcobalt_la_CPPFLAGS =                                        \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(top_srcdir)                                 \
+libcobalt_la_CPPFLAGS =                \
+       @XENO_COBALT_CFLAGS@    \
+       -I$(top_srcdir)         \
        -I$(top_srcdir)/include
 
 install-data-local:
diff --git a/lib/cobalt/Makefile.in b/lib/cobalt/Makefile.in
index 0fd8e86..7198443 100644
--- a/lib/cobalt/Makefile.in
+++ b/lib/cobalt/Makefile.in
@@ -374,8 +374,8 @@ libcobalt_la_SOURCES = \
        wrappers.c
 
 libcobalt_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(top_srcdir)                                 \
+       @XENO_COBALT_CFLAGS@    \
+       -I$(top_srcdir)         \
        -I$(top_srcdir)/include
 
 EXTRA_DIST = cobalt.wrappers
diff --git a/lib/cobalt/arm/Makefile.am b/lib/cobalt/arm/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/arm/Makefile.am
+++ b/lib/cobalt/arm/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/arm/Makefile.in b/lib/cobalt/arm/Makefile.in
index 3244aa1..7f90ec3 100644
--- a/lib/cobalt/arm/Makefile.in
+++ b/lib/cobalt/arm/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/blackfin/Makefile.am b/lib/cobalt/blackfin/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/blackfin/Makefile.am
+++ b/lib/cobalt/blackfin/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/blackfin/Makefile.in b/lib/cobalt/blackfin/Makefile.in
index 7442560..1fef3f9 100644
--- a/lib/cobalt/blackfin/Makefile.in
+++ b/lib/cobalt/blackfin/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/blackfin/features.c b/lib/cobalt/blackfin/features.c
index f067722..252c349 100644
--- a/lib/cobalt/blackfin/features.c
+++ b/lib/cobalt/blackfin/features.c
@@ -17,6 +17,7 @@
  */
 
 #include <asm/xenomai/uapi/features.h>
+#include "internal.h"
 
 void cobalt_check_features(struct xnfeatinfo *finfo)
 {
diff --git a/lib/cobalt/nios2/Makefile.am b/lib/cobalt/nios2/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/nios2/Makefile.am
+++ b/lib/cobalt/nios2/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/nios2/Makefile.in b/lib/cobalt/nios2/Makefile.in
index 790b0cf..dfc1147 100644
--- a/lib/cobalt/nios2/Makefile.in
+++ b/lib/cobalt/nios2/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/nios2/features.c b/lib/cobalt/nios2/features.c
index 12fb23a..af1a028 100644
--- a/lib/cobalt/nios2/features.c
+++ b/lib/cobalt/nios2/features.c
@@ -29,7 +29,7 @@
 
 __attribute__((weak)) volatile void *__cobalt_nios2_hrclock = NULL;
 
-static inline void cobalt_check_features(struct xnfeatinfo *finfo)
+void cobalt_check_features(struct xnfeatinfo *finfo)
 {
        unsigned long pa = finfo->feat_arch.hrclock_membase;
        unsigned int pagesz;
diff --git a/lib/cobalt/powerpc/Makefile.am b/lib/cobalt/powerpc/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/powerpc/Makefile.am
+++ b/lib/cobalt/powerpc/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/powerpc/Makefile.in b/lib/cobalt/powerpc/Makefile.in
index a08146a..742c63a 100644
--- a/lib/cobalt/powerpc/Makefile.in
+++ b/lib/cobalt/powerpc/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/powerpc/features.c b/lib/cobalt/powerpc/features.c
index b9d3189..9fa656d 100644
--- a/lib/cobalt/powerpc/features.c
+++ b/lib/cobalt/powerpc/features.c
@@ -17,6 +17,7 @@
  */
 
 #include <xenomai/syscall.h>
+#include "internal.h"
 
 void cobalt_check_features(struct xnfeatinfo *finfo)
 {
diff --git a/lib/cobalt/sh/Makefile.am b/lib/cobalt/sh/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/sh/Makefile.am
+++ b/lib/cobalt/sh/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/sh/Makefile.in b/lib/cobalt/sh/Makefile.in
index 3922eae..7d6d72f 100644
--- a/lib/cobalt/sh/Makefile.in
+++ b/lib/cobalt/sh/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/sigshadow.c b/lib/cobalt/sigshadow.c
index f67a67a..c90bee9 100644
--- a/lib/cobalt/sigshadow.c
+++ b/lib/cobalt/sigshadow.c
@@ -18,6 +18,7 @@
 #include <pthread.h>
 #include <signal.h>
 #include <xenomai/syscall.h>
+#include "internal.h"
 
 #ifdef __UCLIBC__
 static inline int backtrace(void **buffer, int size)
diff --git a/lib/cobalt/ticks.c b/lib/cobalt/ticks.c
index fda63f0..b1d4215 100644
--- a/lib/cobalt/ticks.c
+++ b/lib/cobalt/ticks.c
@@ -17,6 +17,7 @@
  */
 #include <cobalt/arith.h>
 #include <cobalt/ticks.h>
+#include "internal.h"
 
 static unsigned long long clockfreq;
 
diff --git a/lib/cobalt/trace.c b/lib/cobalt/trace.c
index 3a8d750..260be8a 100644
--- a/lib/cobalt/trace.c
+++ b/lib/cobalt/trace.c
@@ -16,6 +16,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
  */
 #include <cobalt/kernel/uapi/trace.h>
+#include <cobalt/trace.h>
 #include <xenomai/syscall.h>
 
 int xntrace_max_begin(unsigned long v)
diff --git a/lib/cobalt/x86/Makefile.am b/lib/cobalt/x86/Makefile.am
index 5578d5b..99b8ca8 100644
--- a/lib/cobalt/x86/Makefile.am
+++ b/lib/cobalt/x86/Makefile.am
@@ -4,10 +4,10 @@ libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 
 libarch_la_SOURCES = features.c
 
-libarch_la_CPPFLAGS =                                  \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+libarch_la_CPPFLAGS =                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/lib/cobalt/x86/Makefile.in b/lib/cobalt/x86/Makefile.in
index 7b07108..7f0d06f 100644
--- a/lib/cobalt/x86/Makefile.in
+++ b/lib/cobalt/x86/Makefile.in
@@ -305,9 +305,9 @@ noinst_LTLIBRARIES = libarch.la
 libarch_la_LDFLAGS = @XENO_LIB_LDFLAGS@ -version-info 0:0:0
 libarch_la_SOURCES = features.c
 libarch_la_CPPFLAGS = \
-       @XENO_COBALT_CFLAGS@ -Wno-missing-prototypes    \
-       -I$(srcdir)/..                                  \
-       -I$(top_srcdir)/include/cobalt                  \
+       @XENO_COBALT_CFLAGS@            \
+       -I$(srcdir)/..                  \
+       -I$(top_srcdir)/include/cobalt  \
        -I$(top_srcdir)/include
 
 SUBDIRS = xenomai
diff --git a/testsuite/clocktest/Makefile.am b/testsuite/clocktest/Makefile.am
index aa2f3dc..5574d91 100644
--- a/testsuite/clocktest/Makefile.am
+++ b/testsuite/clocktest/Makefile.am
@@ -8,8 +8,7 @@ clocktest_SOURCES = clocktest.c
 
 clocktest_CPPFLAGS =                   \
        $(XENO_USER_CFLAGS)             \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 clocktest_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
diff --git a/testsuite/clocktest/Makefile.in b/testsuite/clocktest/Makefile.in
index e0ff3092..af7f8fc 100644
--- a/testsuite/clocktest/Makefile.in
+++ b/testsuite/clocktest/Makefile.in
@@ -269,8 +269,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 clocktest_SOURCES = clocktest.c
 clocktest_CPPFLAGS = \
        $(XENO_USER_CFLAGS)             \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 clocktest_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 clocktest_LDADD = \
diff --git a/testsuite/clocktest/clocktest.c b/testsuite/clocktest/clocktest.c
index c000e22..5338e22 100644
--- a/testsuite/clocktest/clocktest.c
+++ b/testsuite/clocktest/clocktest.c
@@ -138,7 +138,7 @@ static inline unsigned long long read_reference_clock(void)
        return tv.tv_usec * 1000ULL + tv.tv_sec * 1000000000ULL;
 }
 
-void check_reference(struct per_cpu_data *per_cpu_data)
+static void check_reference(struct per_cpu_data *per_cpu_data)
 {
        unsigned long long clock_val[10], tod_val[10];
        long long delta, min_delta;
@@ -173,7 +173,7 @@ void check_reference(struct per_cpu_data *per_cpu_data)
        per_cpu_data->offset = clock_val[idx] - tod_val[idx];
 }
 
-void check_time_warps(struct per_cpu_data *per_cpu_data)
+static void check_time_warps(struct per_cpu_data *per_cpu_data)
 {
        int i;
        unsigned long long last, now;
@@ -197,7 +197,7 @@ void check_time_warps(struct per_cpu_data *per_cpu_data)
        }
 }
 
-void *cpu_thread(void *arg)
+static void *cpu_thread(void *arg)
 {
        int cpuid = (long)arg;
        struct sched_param param = { .sched_priority = 1 };
@@ -219,9 +219,11 @@ void *cpu_thread(void *arg)
                delay.tv_nsec = 1000000 + random() * (100000.0 / RAND_MAX);
                nanosleep(&delay, NULL);
        }
+
+       return NULL;
 }
 
-void sighand(int signal)
+static void sighand(int signal)
 {
        exit(0);
 }
diff --git a/testsuite/cyclic/Makefile.am b/testsuite/cyclic/Makefile.am
index f1ced61..2934eee 100644
--- a/testsuite/cyclic/Makefile.am
+++ b/testsuite/cyclic/Makefile.am
@@ -9,7 +9,7 @@ cyclictest_SOURCES = cyclictest.c
 cyclictest_CPPFLAGS =                  \
        $(XENO_USER_CFLAGS)             \
        -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes -DIPIPE_TRACE=1
+       -DIPIPE_TRACE=1
 
 cyclictest_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
diff --git a/testsuite/cyclic/Makefile.in b/testsuite/cyclic/Makefile.in
index 7b8dac5..8f791d5 100644
--- a/testsuite/cyclic/Makefile.in
+++ b/testsuite/cyclic/Makefile.in
@@ -270,7 +270,7 @@ cyclictest_SOURCES = cyclictest.c
 cyclictest_CPPFLAGS = \
        $(XENO_USER_CFLAGS)             \
        -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes -DIPIPE_TRACE=1
+       -DIPIPE_TRACE=1
 
 cyclictest_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 cyclictest_LDADD = \
diff --git a/testsuite/latency/Makefile.am b/testsuite/latency/Makefile.am
index 5a1060e..25d8475 100644
--- a/testsuite/latency/Makefile.am
+++ b/testsuite/latency/Makefile.am
@@ -6,8 +6,7 @@ latency_SOURCES = latency.c
 
 latency_CPPFLAGS =                     \
        $(XENO_USER_CFLAGS)             \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 latency_LDFLAGS =
 
diff --git a/testsuite/latency/Makefile.in b/testsuite/latency/Makefile.in
index 58cad1d..f06bb9c 100644
--- a/testsuite/latency/Makefile.in
+++ b/testsuite/latency/Makefile.in
@@ -271,8 +271,7 @@ testdir = @XENO_TEST_DIR@
 latency_SOURCES = latency.c
 latency_CPPFLAGS = \
        $(XENO_USER_CFLAGS)             \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 latency_LDFLAGS = 
 core_libs = $(am__append_1)
diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c
index 74dc92d..82e5e7f 100644
--- a/testsuite/latency/latency.c
+++ b/testsuite/latency/latency.c
@@ -75,7 +75,7 @@ static inline void add_histogram(long *histogram, long addval)
        histogram[inabs < histogram_size ? inabs : histogram_size - 1]++;
 }
 
-void latency(void *cookie)
+static void latency(void *cookie)
 {
        int err, count, nsamples, warmup = 1;
        RTIME expected_tsc, period_tsc, start_ticks, fault_threshold;
@@ -180,7 +180,7 @@ void latency(void *cookie)
        }
 }
 
-void display(void *cookie)
+static void display(void *cookie)
 {
        int err, n = 0;
        time_t start;
@@ -305,7 +305,7 @@ void display(void *cookie)
        }
 }
 
-double dump_histogram(long *histogram, char *kind)
+static double dump_histogram(long *histogram, char *kind)
 {
        int n, total_hits = 0;
        double avg = 0;         /* used to sum hits 1st */
@@ -330,7 +330,7 @@ double dump_histogram(long *histogram, char *kind)
        return avg;
 }
 
-void dump_histo_gnuplot(long *histogram)
+static void dump_histo_gnuplot(long *histogram)
 {
        unsigned start, stop;
        FILE *f;
@@ -357,7 +357,7 @@ void dump_histo_gnuplot(long *histogram)
        fclose(f);
 }
 
-void dump_stats(long *histogram, char *kind, double avg)
+static void dump_stats(long *histogram, char *kind, double avg)
 {
        int n, total_hits = 0;
        double variance = 0;
@@ -382,7 +382,7 @@ void dump_stats(long *histogram, char *kind, double avg)
               kind, total_hits, avg, variance);
 }
 
-void dump_hist_stats(void)
+static void dump_hist_stats(void)
 {
        double minavg, maxavg, avgavg;
 
@@ -401,7 +401,7 @@ void dump_hist_stats(void)
                dump_histo_gnuplot(histogram_avg);
 }
 
-void cleanup(void)
+static void cleanup(void)
 {
        time_t actual_duration;
        long gmaxj, gminj, gavgj;
@@ -462,7 +462,7 @@ void cleanup(void)
        exit(0);
 }
 
-void faulthand(int sig)
+static void faulthand(int sig)
 {
        xntrace_user_freeze(0, 1);
        signal(sig, SIG_DFL);
diff --git a/testsuite/switchtest/Makefile.am b/testsuite/switchtest/Makefile.am
index 9992ba5..8752dfa 100644
--- a/testsuite/switchtest/Makefile.am
+++ b/testsuite/switchtest/Makefile.am
@@ -8,8 +8,7 @@ switchtest_SOURCES = switchtest.c
 
 switchtest_CPPFLAGS =          \
        $(XENO_USER_CFLAGS)     \
-       -I$(top_srcdir)/include \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 switchtest_LDFLAGS =  $(XENO_POSIX_WRAPPERS)
 
diff --git a/testsuite/switchtest/Makefile.in b/testsuite/switchtest/Makefile.in
index 9fa6753..9de5f26 100644
--- a/testsuite/switchtest/Makefile.in
+++ b/testsuite/switchtest/Makefile.in
@@ -269,8 +269,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 switchtest_SOURCES = switchtest.c
 switchtest_CPPFLAGS = \
        $(XENO_USER_CFLAGS)     \
-       -I$(top_srcdir)/include \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 switchtest_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 switchtest_LDADD = \
diff --git a/testsuite/switchtest/switchtest.c 
b/testsuite/switchtest/switchtest.c
index 3ba0079..297b835 100644
--- a/testsuite/switchtest/switchtest.c
+++ b/testsuite/switchtest/switchtest.c
@@ -194,13 +194,13 @@ static void handle_bad_fpreg(struct cpu_tasks *cpu, 
unsigned fp_val)
        clean_exit(EXIT_FAILURE);
 }
 
-void display_cleanup(void *cookie)
+static void display_cleanup(void *cookie)
 {
        pthread_mutex_t *mutex = (pthread_mutex_t *) cookie;
        __STD(pthread_mutex_unlock(mutex));
 }
 
-void display_switches_count(struct cpu_tasks *cpu, struct timespec *now)
+static void display_switches_count(struct cpu_tasks *cpu, struct timespec *now)
 {
        unsigned long switches_count;
        static unsigned nlines = 0;
@@ -962,7 +962,7 @@ const char *all_fp [] = {
        "rtuo_ufpp_ufps"
 };
 
-unsigned long xatoul(const char *str)
+static unsigned long xatoul(const char *str)
 {
        unsigned long result;
        char *endptr;
@@ -982,7 +982,7 @@ unsigned long xatoul(const char *str)
        return result;
 }
 
-void usage(FILE *fd, const char *progname)
+static void usage(FILE *fd, const char *progname)
 {
        unsigned i, j, nr_cpus;
 
@@ -1047,9 +1047,9 @@ void usage(FILE *fd, const char *progname)
        fprintf(fd, "\n\n");
 }
 
-sigjmp_buf jump;
+static sigjmp_buf jump;
 
-void illegal_instruction(int sig)
+static void illegal_instruction(int sig)
 {
        signal(sig, SIG_DFL);
        siglongjmp(jump, 1);
@@ -1059,7 +1059,7 @@ void illegal_instruction(int sig)
    backup area. This is important on x86, where this results on all RT threads
    FPU backup areas to be clobbered, and thus their FPU context being switched
    systematically (and the case where FPU has never been used not to be 
tested). */
-void *check_fpu_thread(void *cookie)
+static void *check_fpu_thread(void *cookie)
 {
        int check;
 
@@ -1086,7 +1086,7 @@ void *check_fpu_thread(void *cookie)
        return (void *) 1;
 }
 
-int check_fpu(void)
+static int check_fpu(void)
 {
        pthread_t tid;
        void *status;
diff --git a/testsuite/unit/Makefile.am b/testsuite/unit/Makefile.am
index 8323f3d..549caa9 100644
--- a/testsuite/unit/Makefile.am
+++ b/testsuite/unit/Makefile.am
@@ -20,8 +20,7 @@ arith_SOURCES = arith.c arith-noinline.c arith-noinline.h
 
 arith_CPPFLAGS = \
        @XENO_USER_CFLAGS@              \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 arith_LDFLAGS =
 
@@ -38,8 +37,7 @@ mutex_torture_CPPFLAGS =              \
        @XENO_USER_CFLAGS@              \
        -DXENO_POSIX                    \
        -I$(top_srcdir)                 \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 mutex_torture_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
@@ -55,8 +53,7 @@ cond_torture_SOURCES = cond-torture.c
 cond_torture_CPPFLAGS =                \
        @XENO_USER_CFLAGS@              \
        -DXENO_POSIX                    \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 cond_torture_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
@@ -85,8 +82,7 @@ check_vdso_SOURCES = check-vdso.c
 
 check_vdso_CPPFLAGS =                  \
        @XENO_USER_CFLAGS@              \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 check_vdso_LDFLAGS =
 
@@ -103,8 +99,7 @@ wakeup_time_SOURCES = wakeup-time.c
 
 wakeup_time_CPPFLAGS =                 \
        @XENO_USER_CFLAGS@              \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 wakeup_time_LDFLAGS =
 
@@ -120,8 +115,7 @@ rtdm_SOURCES = rtdm.c
 rtdm_CPPFLAGS =                                \
        @XENO_USER_CFLAGS@              \
        -DXENO_POSIX                    \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 rtdm_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 
diff --git a/testsuite/unit/Makefile.in b/testsuite/unit/Makefile.in
index c2727a7..1ac5ec8 100644
--- a/testsuite/unit/Makefile.in
+++ b/testsuite/unit/Makefile.in
@@ -345,8 +345,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 @XENO_COBALT_TRUE@arith_SOURCES = arith.c arith-noinline.c arith-noinline.h
 @XENO_COBALT_TRUE@arith_CPPFLAGS = \
 @XENO_COBALT_TRUE@     @XENO_USER_CFLAGS@              \
-@XENO_COBALT_TRUE@     -I$(top_srcdir)/include         \
-@XENO_COBALT_TRUE@     -Wno-missing-prototypes 
+@XENO_COBALT_TRUE@     -I$(top_srcdir)/include
 
 @XENO_COBALT_TRUE@arith_LDFLAGS = 
 @XENO_COBALT_TRUE@arith_LDADD = \
@@ -361,8 +360,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 @XENO_COBALT_TRUE@     @XENO_USER_CFLAGS@              \
 @XENO_COBALT_TRUE@     -DXENO_POSIX                    \
 @XENO_COBALT_TRUE@     -I$(top_srcdir)                 \
-@XENO_COBALT_TRUE@     -I$(top_srcdir)/include         \
-@XENO_COBALT_TRUE@     -Wno-missing-prototypes 
+@XENO_COBALT_TRUE@     -I$(top_srcdir)/include
 
 @XENO_COBALT_TRUE@mutex_torture_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 @XENO_COBALT_TRUE@mutex_torture_LDADD = \
@@ -376,8 +374,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 @XENO_COBALT_TRUE@cond_torture_CPPFLAGS = \
 @XENO_COBALT_TRUE@     @XENO_USER_CFLAGS@              \
 @XENO_COBALT_TRUE@     -DXENO_POSIX                    \
-@XENO_COBALT_TRUE@     -I$(top_srcdir)/include         \
-@XENO_COBALT_TRUE@     -Wno-missing-prototypes 
+@XENO_COBALT_TRUE@     -I$(top_srcdir)/include
 
 @XENO_COBALT_TRUE@cond_torture_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 @XENO_COBALT_TRUE@cond_torture_LDADD = \
@@ -402,8 +399,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 @XENO_COBALT_TRUE@check_vdso_SOURCES = check-vdso.c
 @XENO_COBALT_TRUE@check_vdso_CPPFLAGS = \
 @XENO_COBALT_TRUE@     @XENO_USER_CFLAGS@              \
-@XENO_COBALT_TRUE@     -I$(top_srcdir)/include         \
-@XENO_COBALT_TRUE@     -Wno-missing-prototypes 
+@XENO_COBALT_TRUE@     -I$(top_srcdir)/include
 
 @XENO_COBALT_TRUE@check_vdso_LDFLAGS = 
 @XENO_COBALT_TRUE@check_vdso_LDADD = \
@@ -414,8 +410,7 @@ CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)
 wakeup_time_SOURCES = wakeup-time.c
 wakeup_time_CPPFLAGS = \
        @XENO_USER_CFLAGS@              \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 wakeup_time_LDFLAGS = 
 wakeup_time_LDADD = \
@@ -429,8 +424,7 @@ rtdm_SOURCES = rtdm.c
 rtdm_CPPFLAGS = \
        @XENO_USER_CFLAGS@              \
        -DXENO_POSIX                    \
-       -I$(top_srcdir)/include         \
-       -Wno-missing-prototypes 
+       -I$(top_srcdir)/include
 
 rtdm_LDFLAGS = $(XENO_POSIX_WRAPPERS)
 rtdm_LDADD = \
diff --git a/testsuite/unit/arith-noinline.c b/testsuite/unit/arith-noinline.c
index abe402d..ece02e7 100644
--- a/testsuite/unit/arith-noinline.c
+++ b/testsuite/unit/arith-noinline.c
@@ -1,7 +1,7 @@
 #include <stdio.h>
 #include <stdlib.h>
-
 #include <cobalt/arith.h>
+#include "arith-noinline.h"
 
 long long dummy(void)
 {
diff --git a/testsuite/unit/arith-noinline.h b/testsuite/unit/arith-noinline.h
index ca237e9..3dd7700 100644
--- a/testsuite/unit/arith-noinline.h
+++ b/testsuite/unit/arith-noinline.h
@@ -1,7 +1,7 @@
 #ifndef OUTOFLINE_H
 #define OUTOFLINE_H
 
-unsigned long long dummy(void);
+long long dummy(void);
 
 long long
 do_llimd(long long ull, unsigned m, unsigned d);
diff --git a/testsuite/unit/cond-torture.c b/testsuite/unit/cond-torture.c
index 55e0da5..64e6b4b 100644
--- a/testsuite/unit/cond-torture.c
+++ b/testsuite/unit/cond-torture.c
@@ -21,7 +21,7 @@
 #define NS_PER_MS (1000000)
 #define NS_PER_S (1000000000)
 
-unsigned long long timer_read(void)
+static unsigned long long timer_read(void)
 {
        struct timespec ts;
 
@@ -29,7 +29,7 @@ unsigned long long timer_read(void)
        return (unsigned long long)ts.tv_sec * NS_PER_S + ts.tv_nsec;
 }
 
-int mutex_init(pthread_mutex_t *mutex, int type, int pi)
+static int mutex_init(pthread_mutex_t *mutex, int type, int pi)
 {
        pthread_mutexattr_t mattr;
        int err;
@@ -58,7 +58,7 @@ int mutex_init(pthread_mutex_t *mutex, int type, int pi)
 #define mutex_unlock(mutex) (-pthread_mutex_unlock(mutex))
 #define mutex_destroy(mutex) (-pthread_mutex_destroy(mutex))
 
-int cond_init(pthread_cond_t *cond, int absolute)
+static int cond_init(pthread_cond_t *cond, int absolute)
 {
        pthread_condattr_t cattr;
        int err;
@@ -80,7 +80,7 @@ int cond_init(pthread_cond_t *cond, int absolute)
 }
 #define cond_signal(cond) (-pthread_cond_signal(cond))
 
-int cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, unsigned long long 
ns)
+static int cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, unsigned 
long long ns)
 {
        struct timespec ts;
 
@@ -95,7 +95,7 @@ int cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex, 
unsigned long long n
        return -pthread_cond_timedwait(cond, mutex, &ts);
 }
 
-int cond_wait_until(pthread_cond_t *cond, pthread_mutex_t *mutex, unsigned 
long long date)
+static int cond_wait_until(pthread_cond_t *cond, pthread_mutex_t *mutex, 
unsigned long long date)
 {
        struct timespec ts = {
                .tv_sec = date / NS_PER_S,
@@ -106,7 +106,7 @@ int cond_wait_until(pthread_cond_t *cond, pthread_mutex_t 
*mutex, unsigned long
 }
 #define cond_destroy(cond) (-pthread_cond_destroy(cond))
 
-int thread_msleep(unsigned ms)
+static int thread_msleep(unsigned ms)
 {
        struct timespec ts = {
                .tv_sec = (ms * NS_PER_MS) / NS_PER_S,
@@ -116,8 +116,8 @@ int thread_msleep(unsigned ms)
        return -nanosleep(&ts, NULL);
 }
 
-int thread_spawn(pthread_t *thread, int prio,
-                void *(*handler)(void *cookie), void *cookie)
+static int thread_spawn(pthread_t *thread, int prio,
+                       void *(*handler)(void *cookie), void *cookie)
 {
        struct sched_param param;
        pthread_attr_t tattr;
@@ -142,7 +142,7 @@ int thread_spawn(pthread_t *thread, int prio,
 #define thread_self() pthread_self()
 #define thread_join(thread) (-pthread_join(thread, NULL))
 
-void check_inner(const char *file, int line, const char *fn, const char *msg, 
int status, int expected)
+static void check_inner(const char *file, int line, const char *fn, const char 
*msg, int status, int expected)
 {
        if (status == expected)
                return;
@@ -160,7 +160,7 @@ void check_inner(const char *file, int line, const char 
*fn, const char *msg, in
                check_inner(__FILE__, __LINE__, __FUNCTION__, msg, s < 0 ? 
-errno : s, expected); \
        })
 
-void check_sleep_inner(const char *fn,
+static void check_sleep_inner(const char *fn,
                       const char *prefix, unsigned long long start)
 {
        unsigned long long diff = rt_timer_tsc2ns(rt_timer_tsc() - start);
@@ -180,7 +180,7 @@ struct cond_mutex {
        pthread_t tid;
 };
 
-void *cond_signaler(void *cookie)
+static void *cond_signaler(void *cookie)
 {
        unsigned long long start;
        struct cond_mutex *cm = cookie;
@@ -195,7 +195,7 @@ void *cond_signaler(void *cookie)
        return NULL;
 }
 
-void simple_condwait(void)
+static void simple_condwait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -225,7 +225,7 @@ void simple_condwait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void relative_condwait(void)
+static void relative_condwait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -248,7 +248,7 @@ void relative_condwait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void absolute_condwait(void)
+static void absolute_condwait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -271,7 +271,7 @@ void absolute_condwait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void *cond_killer(void *cookie)
+static void *cond_killer(void *cookie)
 {
        unsigned long long start;
        struct cond_mutex *cm = cookie;
@@ -286,14 +286,14 @@ void *cond_killer(void *cookie)
        return NULL;
 }
 
-volatile int sig_seen;
+static volatile int sig_seen;
 
-void sighandler(int sig)
+static void sighandler(int sig)
 {
        ++sig_seen;
 }
 
-void sig_norestart_condwait(void)
+static void sig_norestart_condwait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -331,7 +331,7 @@ void sig_norestart_condwait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void sig_restart_condwait(void)
+static void sig_restart_condwait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -369,7 +369,7 @@ void sig_restart_condwait(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void *mutex_killer(void *cookie)
+static void *mutex_killer(void *cookie)
 {
        unsigned long long start;
        struct cond_mutex *cm = cookie;
@@ -385,7 +385,7 @@ void *mutex_killer(void *cookie)
        return NULL;
 }
 
-void sig_norestart_condwait_mutex(void)
+static void sig_norestart_condwait_mutex(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -425,7 +425,7 @@ void sig_norestart_condwait_mutex(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void sig_restart_condwait_mutex(void)
+static void sig_restart_condwait_mutex(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -465,7 +465,7 @@ void sig_restart_condwait_mutex(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void *double_killer(void *cookie)
+static void *double_killer(void *cookie)
 {
        unsigned long long start;
        struct cond_mutex *cm = cookie;
@@ -481,7 +481,7 @@ void *double_killer(void *cookie)
        return NULL;
 }
 
-void sig_norestart_double(void)
+static void sig_norestart_double(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -521,7 +521,7 @@ void sig_norestart_double(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void sig_restart_double(void)
+static void sig_restart_double(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
@@ -562,7 +562,7 @@ void sig_restart_double(void)
        check("cond_destroy", cond_destroy(&cond), 0);
 }
 
-void *cond_destroyer(void *cookie)
+static void *cond_destroyer(void *cookie)
 {
        unsigned long long start;
        struct cond_mutex *cm = cookie;
@@ -577,7 +577,7 @@ void *cond_destroyer(void *cookie)
        return NULL;
 }
 
-void cond_destroy_whilewait(void)
+static void cond_destroy_whilewait(void)
 {
        unsigned long long start;
        pthread_mutex_t mutex;
diff --git a/testsuite/unit/mutex-torture.c b/testsuite/unit/mutex-torture.c
index 9184d37..6d8f7de 100644
--- a/testsuite/unit/mutex-torture.c
+++ b/testsuite/unit/mutex-torture.c
@@ -48,7 +48,7 @@ static const char *reason_str[] = {
        [SIGDEBUG_WATCHDOG] = "runaway thread",
 };
 
-void sigdebug(int sig, siginfo_t *si, void *context)
+static void sigdebug(int sig, siginfo_t *si, void *context)
 {
        unsigned int reason = si->si_value.sival_int;
 
@@ -56,7 +56,7 @@ void sigdebug(int sig, siginfo_t *si, void *context)
               reason <= SIGDEBUG_WATCHDOG ? reason_str[reason] : "<unknown>");
 }
 
-void add_timespec(struct timespec *ts, unsigned long long value)
+static void add_timespec(struct timespec *ts, unsigned long long value)
 {
        ts->tv_sec += value / 1000000000;
        ts->tv_nsec += value % 1000000000;
@@ -66,7 +66,7 @@ void add_timespec(struct timespec *ts, unsigned long long 
value)
        }
 }
 
-void ms_sleep(int time)
+static void ms_sleep(int time)
 {
        struct timespec ts;
 
@@ -76,7 +76,7 @@ void ms_sleep(int time)
        nanosleep(&ts, NULL);
 }
 
-void check_current_prio(int expected_prio)
+static void check_current_prio(int expected_prio)
 {
        int current_prio;
 # ifdef __cobalt_get_current_prio
@@ -95,7 +95,7 @@ void check_current_prio(int expected_prio)
        }
 }
 
-void check_current_mode(int mask, int expected_value)
+static void check_current_mode(int mask, int expected_value)
 {
        int current_mode;
 
@@ -112,13 +112,8 @@ void check_current_mode(int mask, int expected_value)
        }
 }
 
-void yield(void)
-{
-       sched_yield();
-}
-
-int dispatch(const char *service_name,
-            int service_type, int check, int expected, ...)
+static int dispatch(const char *service_name,
+                     int service_type, int check, int expected, ...)
 {
        unsigned long long timeout;
        pthread_t *thread;
@@ -247,7 +242,7 @@ int dispatch(const char *service_name,
        return status;
 }
 
-void *waiter(void *cookie)
+static void *waiter(void *cookie)
 {
        pthread_mutex_t *mutex = (pthread_mutex_t *) cookie;
        unsigned long long start, diff;
@@ -267,7 +262,7 @@ void *waiter(void *cookie)
        return cookie;
 }
 
-void simple_wait(void)
+static void simple_wait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -281,7 +276,7 @@ void simple_wait(void)
                 waiter, &mutex);
        ms_sleep(11);
        dispatch("simple mutex_unlock 1", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
 
        start = rt_timer_tsc();
        dispatch("simple mutex_lock 2", MUTEX_LOCK, 1, 0, &mutex);
@@ -296,7 +291,7 @@ void simple_wait(void)
        dispatch("simple mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-void recursive_wait(void)
+static void recursive_wait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -315,7 +310,7 @@ void recursive_wait(void)
        dispatch("rec mutex_unlock 2", MUTEX_UNLOCK, 1, 0, &mutex);
        ms_sleep(11);
        dispatch("rec mutex_unlock 1", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
 
        start = rt_timer_tsc();
        dispatch("rec mutex_lock 3", MUTEX_LOCK, 1, 0, &mutex);
@@ -330,7 +325,7 @@ void recursive_wait(void)
        dispatch("rec mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-void errorcheck_wait(void)
+static void errorcheck_wait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -354,7 +349,7 @@ void errorcheck_wait(void)
                 waiter, &mutex);
        ms_sleep(11);
        dispatch("errorcheck mutex_unlock 1", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
        err = pthread_mutex_unlock(&mutex);
        if (err != EPERM) {
                fprintf(stderr, "FAILURE: errorcheck mutex_unlock 2: %s\n",
@@ -374,7 +369,7 @@ void errorcheck_wait(void)
        dispatch("errorcheck mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-void *timed_waiter(void *cookie)
+static void *timed_waiter(void *cookie)
 {
        pthread_mutex_t *mutex = (pthread_mutex_t *) cookie;
        unsigned long long start, diff;
@@ -394,7 +389,7 @@ void *timed_waiter(void *cookie)
        return cookie;
 }
 
-void timed_mutex(void)
+static void timed_mutex(void)
 {
        pthread_mutex_t mutex;
        pthread_t waiter_tid;
@@ -412,7 +407,7 @@ void timed_mutex(void)
 
 }
 
-void mode_switch(void)
+static void mode_switch(void)
 {
        pthread_mutex_t mutex;
 
@@ -434,7 +429,7 @@ void mode_switch(void)
        dispatch("switch mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-void pi_wait(void)
+static void pi_wait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -455,7 +450,7 @@ void pi_wait(void)
        check_current_prio(3);
 
        dispatch("pi mutex_unlock 1", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
 
        check_current_prio(2);
 
@@ -471,7 +466,7 @@ void pi_wait(void)
        dispatch("pi mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
 }
 
-void lock_stealing(void)
+static void lock_stealing(void)
 {
        pthread_mutex_t mutex;
        pthread_t lowprio_tid;
@@ -540,7 +535,7 @@ void lock_stealing(void)
                        "NOTE: lock_stealing mutex_trylock: not supported\n");
 }
 
-void *victim(void *cookie)
+static void *victim(void *cookie)
 {
        pthread_mutex_t *mutex = (pthread_mutex_t *) cookie;
        unsigned long long start;
@@ -556,7 +551,7 @@ void *victim(void *cookie)
        return cookie;
 }
 
-void deny_stealing(void)
+static void deny_stealing(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -606,7 +601,7 @@ struct cond_mutex {
        pthread_cond_t *cond;
 };
 
-void *cond_signaler(void *cookie)
+static void *cond_signaler(void *cookie)
 {
        struct cond_mutex *cm = (struct cond_mutex *) cookie;
        unsigned long long start, diff;
@@ -624,7 +619,7 @@ void *cond_signaler(void *cookie)
        ms_sleep(11);
        dispatch("cond_signaler cond_signal", COND_SIGNAL, 1, 0, cm->cond);
        dispatch("cond_signaler mutex_unlock 2", MUTEX_UNLOCK, 1, 0, cm->mutex);
-       yield();
+       sched_yield();
 
        start = rt_timer_tsc();
        dispatch("cond_signaler mutex_lock 2", MUTEX_LOCK, 1, 0, cm->mutex);
@@ -640,7 +635,7 @@ void *cond_signaler(void *cookie)
        return cookie;
 }
 
-void simple_condwait(void)
+static void simple_condwait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -670,7 +665,7 @@ void simple_condwait(void)
        }
        ms_sleep(11);
        dispatch("simple_condwait mutex_unlock", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
 
        dispatch("simple_condwait mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
        dispatch("simple_condwait cond_destroy", COND_DESTROY, 1, 0, &cond);
@@ -678,7 +673,7 @@ void simple_condwait(void)
        dispatch("simple_condwait join", THREAD_JOIN, 1, 0, &cond_signaler_tid);
 }
 
-void recursive_condwait(void)
+static void recursive_condwait(void)
 {
        unsigned long long start, diff;
        pthread_mutex_t mutex;
@@ -711,7 +706,7 @@ void recursive_condwait(void)
        dispatch("rec_condwait mutex_unlock 1", MUTEX_UNLOCK, 1, 0, &mutex);
        ms_sleep(11);
        dispatch("rec_condwait mutex_unlock 2", MUTEX_UNLOCK, 1, 0, &mutex);
-       yield();
+       sched_yield();
 
        dispatch("rec_condwait mutex_destroy", MUTEX_DESTROY, 1, 0, &mutex);
        dispatch("rec_condwait cond_destroy", COND_DESTROY, 1, 0, &cond);
@@ -719,7 +714,7 @@ void recursive_condwait(void)
        dispatch("rec_condwait join", THREAD_JOIN, 1, 0, &cond_signaler_tid);
 }
 
-void nrt_lock(void *cookie)
+static void nrt_lock(void *cookie)
 {
        pthread_mutex_t *mutex = cookie;
 
@@ -744,7 +739,7 @@ void nrt_lock(void *cookie)
        check_current_mode(XNRELAX | XNWEAK, XNRELAX | XNWEAK);
 }
 
-void auto_switchback(void)
+static void auto_switchback(void)
 {
        pthread_t nrt_lock_tid;
        pthread_mutex_t mutex;
diff --git a/testsuite/unit/wakeup-time.c b/testsuite/unit/wakeup-time.c
index bb2b973..d1b1e61 100644
--- a/testsuite/unit/wakeup-time.c
+++ b/testsuite/unit/wakeup-time.c
@@ -46,7 +46,7 @@ static inline void add_histogram(long addval)
        histogram[inabs < HISTOGRAM_CELLS ? inabs : HISTOGRAM_CELLS - 1]++;
 }
 
-void dump_stats(double sum, int total_hits)
+static void dump_stats(double sum, int total_hits)
 {
        int n;
        double avg, variance = 0;
@@ -65,7 +65,7 @@ void dump_stats(double sum, int total_hits)
        printf("HSS| %9d| %10.3f| %10.3f\n", total_hits, avg, variance);
 }
 
-void dump_histogram(void)
+static void dump_histogram(void)
 {
        int n, total_hits = 0;
        double sum = 0;
@@ -82,7 +82,7 @@ void dump_histogram(void)
        dump_stats(sum, total_hits);
 }
 
-void event(void *cookie)
+static void event(void *cookie)
 {
        int err;
 
@@ -115,7 +115,7 @@ void event(void *cookie)
        }
 }
 
-void worker(void *cookie)
+static void worker(void *cookie)
 {
        long long minj = 10000000, maxj = -10000000, dt, sumj = 0;
        unsigned long long count = 0;


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to