From: Mark Wielaard Date: Tue, 30 Jun 2015 22:34:32 +0000 (+0200) Subject: Various fixes for test failures caused by implicit warnings. X-Git-Tag: release-2.9~196 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=2d703227f41f6625f6041b1354010cf1530099ae;p=systemtap.git Various fixes for test failures caused by implicit warnings. Add various function and variable declarations and/or includes for failures caused by new gcc warnings -Wimplicit-function-declaration or -Wimplicit-int. --- diff --git a/testsuite/systemtap.base/at_var_cu_1.c b/testsuite/systemtap.base/at_var_cu_1.c index 094d40b4e..b214d0d34 100644 --- a/testsuite/systemtap.base/at_var_cu_1.c +++ b/testsuite/systemtap.base/at_var_cu_1.c @@ -1,5 +1,7 @@ extern void foo(void); extern void bar(void); +extern void baz(void); +extern void bah(void); static int main_global = 5; diff --git a/testsuite/systemtap.base/buildid.c b/testsuite/systemtap.base/buildid.c index 7056e4cde..d0c5960ca 100644 --- a/testsuite/systemtap.base/buildid.c +++ b/testsuite/systemtap.base/buildid.c @@ -1,3 +1,4 @@ +void foo (); #ifndef ONLY_MAIN void foo () { diff --git a/testsuite/systemtap.base/inlinedvars.c b/testsuite/systemtap.base/inlinedvars.c index cc7e69307..32d6874da 100644 --- a/testsuite/systemtap.base/inlinedvars.c +++ b/testsuite/systemtap.base/inlinedvars.c @@ -21,16 +21,16 @@ m(char *name, int i, long j) static inline int call(int pi, long pj) { - volatile ic = pi - 42; - volatile jc = pj + 42; + volatile int ic = pi - 42; + volatile long jc = pj + 42; return m("call", ic, jc); } static inline int call2(int pi2, long pj2) { - volatile ic2 = pi2 + 64; - volatile jc2 = pj2 - 64; + volatile int ic2 = pi2 + 64; + volatile long jc2 = pj2 - 64; return m("call2", ic2, jc2); } diff --git a/testsuite/systemtap.base/labels.exp b/testsuite/systemtap.base/labels.exp index 8e8cfcb79..11bcc829f 100644 --- a/testsuite/systemtap.base/labels.exp +++ b/testsuite/systemtap.base/labels.exp @@ -9,6 +9,7 @@ set label_sopath "[pwd]/labels.so" set label_flags "additional_flags=-g" set fp [open $label_srcpath "w"] puts $fp " +#include int foo () { diff --git a/testsuite/systemtap.base/multisym_main.c b/testsuite/systemtap.base/multisym_main.c index e8573852c..ec19c27a3 100644 --- a/testsuite/systemtap.base/multisym_main.c +++ b/testsuite/systemtap.base/multisym_main.c @@ -1,3 +1,5 @@ +int bar (int i); + int foo (int v) { return bar (v - 1); diff --git a/testsuite/systemtap.base/pthread_stacks.c b/testsuite/systemtap.base/pthread_stacks.c index a9c15b8dc..889ca5e22 100644 --- a/testsuite/systemtap.base/pthread_stacks.c +++ b/testsuite/systemtap.base/pthread_stacks.c @@ -1,9 +1,10 @@ +#define _GNU_SOURCE /* For pthread_getattr_np */ #include #include #include #include #include - +#include static pthread_once_t printed_p = PTHREAD_ONCE_INIT; void print_it () diff --git a/testsuite/systemtap.base/stmt_rel_user.c b/testsuite/systemtap.base/stmt_rel_user.c index 6f09a9593..182154c09 100644 --- a/testsuite/systemtap.base/stmt_rel_user.c +++ b/testsuite/systemtap.base/stmt_rel_user.c @@ -22,7 +22,7 @@ Error (char *emsg) } static inline void -Makenull (s) +Makenull (int s) { stack[s] = 0; } diff --git a/testsuite/systemtap.base/utrace_p5_multi.c b/testsuite/systemtap.base/utrace_p5_multi.c index 8d6087697..aa492767a 100644 --- a/testsuite/systemtap.base/utrace_p5_multi.c +++ b/testsuite/systemtap.base/utrace_p5_multi.c @@ -4,6 +4,7 @@ #include #include #include +#include void *thread_function( void *ptr );