]> sourceware.org Git - systemtap.git/commitdiff
Various fixes for test failures caused by implicit warnings.
authorMark Wielaard <mjw@redhat.com>
Tue, 30 Jun 2015 22:34:32 +0000 (00:34 +0200)
committerMark Wielaard <mjw@redhat.com>
Tue, 30 Jun 2015 22:34:36 +0000 (00:34 +0200)
Add various function and variable declarations and/or includes for
failures caused by new gcc warnings -Wimplicit-function-declaration
or -Wimplicit-int.

testsuite/systemtap.base/at_var_cu_1.c
testsuite/systemtap.base/buildid.c
testsuite/systemtap.base/inlinedvars.c
testsuite/systemtap.base/labels.exp
testsuite/systemtap.base/multisym_main.c
testsuite/systemtap.base/pthread_stacks.c
testsuite/systemtap.base/stmt_rel_user.c
testsuite/systemtap.base/utrace_p5_multi.c

index 094d40b4e04d2ee40a1e84f34e4c6d3f8edcd07e..b214d0d340f989cac18d2c99f4ee8560240ed8f3 100644 (file)
@@ -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;
 
index 7056e4cde325fbd12aa3e3ee54ae024e32d7489f..d0c5960ca4d9479b6131f9eb312a8dd6ca66ee7d 100644 (file)
@@ -1,3 +1,4 @@
+void foo ();
 #ifndef ONLY_MAIN
 void foo ()
 {
index cc7e69307efff97e6e787961f703c202c19b0da4..32d6874da8c2ce802df865406e07b65cd022b82d 100644 (file)
@@ -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);
 }
 
index 8e8cfcb796131f6796578886f57def0d04c3967c..11bcc829f6f9291d5487150c20cb04f455ec3b35 100644 (file)
@@ -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 <unistd.h>
 int
 foo ()
 {
index e8573852c701a3f5ac7c97811016c17426a5889c..ec19c27a3ba1c79fd4d90aff8abb3a148fb32dbd 100644 (file)
@@ -1,3 +1,5 @@
+int bar (int i);
+
 int foo (int v)
 {
        return bar (v - 1);
index a9c15b8dc378d3ed441406a67dce92c868b6f7ab..889ca5e2261459b3dbd15f39b4d0fcd3e509b12b 100644 (file)
@@ -1,9 +1,10 @@
+#define _GNU_SOURCE             /* For pthread_getattr_np */
 #include <pthread.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <assert.h>
 #include <errno.h>
-
+#include <stdlib.h>
 
 static pthread_once_t printed_p = PTHREAD_ONCE_INIT;
 void print_it () 
index 6f09a9593ebcbd03960a72a3fdcb94eb1592a4df..182154c09a11f250470b30af71d0bfb3e3eeab25 100644 (file)
@@ -22,7 +22,7 @@ Error (char *emsg)
 }
 
 static inline void  
-Makenull (s)
+Makenull (int s)
 {
   stack[s] = 0;
 }
index 8d6087697fb1e174710fcdd4e7044501443704d3..aa492767a9b59cbe25902b8af22c67bc222648de 100644 (file)
@@ -4,6 +4,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 void *thread_function( void *ptr );
 
This page took 0.033193 seconds and 5 git commands to generate.