OSDN Git Service

Fix a number of compile time warnings so that uClibc will build with -Werror using
authorDavid McCullough <davidm@snapgear.com>
Fri, 9 Aug 2002 13:03:00 +0000 (13:03 -0000)
committerDavid McCullough <davidm@snapgear.com>
Fri, 9 Aug 2002 13:03:00 +0000 (13:03 -0000)
a 3.0.4 version of the sh-linux-gcc compiler.

include/features.h
libc/stdio/printf.c
libc/sysdeps/linux/common/syscalls.c
libc/sysdeps/linux/sh/longjmp.c
libm/e_asin.c
libm/e_exp.c
libm/e_rem_pio2.c
libm/s_expm1.c

index 230baed..ca36416 100644 (file)
@@ -422,8 +422,8 @@ uClibc was built without large file support enabled.
 #define __builtin_expect(x, expected_value) (x)
 #endif
 
-#define likely(x)       __builtin_expect((x),1)
-#define unlikely(x)     __builtin_expect((x),0)
+#define likely(x)       __builtin_expect(((int)(x)),1)
+#define unlikely(x)     __builtin_expect(((int)(x)),0)
 
 /* --- this is added to integrate linuxthreads */
 #define __USE_UNIX98            1
index de50ed4..14e3f21 100644 (file)
@@ -764,7 +764,7 @@ extern int _ppfs_parsespec(ppfs_t *ppfs)
        int n;
        int argtype[MAX_ARGS_PER_SPEC+2];
        int argnumber[3];                       /* width, precision, 1st data arg */
-       unsigned int conv_num;
+       unsigned int conv_num = 0;
        static const char spec_flags[] = SPEC_FLAGS;
        static const char spec_chars[] = SPEC_CHARS;/* TODO: b? */
        static const char spec_ranges[] = SPEC_RANGES;
index 4acd040..ff7c384 100644 (file)
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/syscall.h>
+#include <endian.h>
 
 
 //#define __NR_exit             1
index a17147d..dd4f684 100644 (file)
@@ -24,6 +24,8 @@
 #include <setjmp.h>
 #include <signal.h>
 
+extern int __longjmp(char *env, int val);
+extern int __sigprocmask(int how, const sigset_t *set, sigset_t *oldset);
 
 /* Set the signal mask to the one specified in ENV, and jump
    to the position specified in ENV, causing the setjmp
@@ -36,7 +38,7 @@ void __libc_siglongjmp (sigjmp_buf env, int val)
                          (sigset_t *) NULL);
 
   /* Call the machine-dependent function to restore machine state.  */
-  __longjmp (env[0].__jmpbuf, val ?: 1);
+  __longjmp ((char *) env[0].__jmpbuf, val ?: 1);
 }
 
 __asm__(".weak longjmp; longjmp = __libc_siglongjmp");
index 46b93d8..210fdbf 100644 (file)
@@ -77,7 +77,7 @@ qS4 =  7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
        double x;
 #endif
 {
-       double t,w,p,q,c,r,s;
+       double t=0.0,w,p,q,c,r,s;
        int32_t hx,ix;
        GET_HIGH_WORD(hx,x);
        ix = hx&0x7fffffff;
index 7341667..f92910e 100644 (file)
@@ -111,8 +111,8 @@ P5   =  4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
 #endif
 {
        double y;
-       double hi = 0;
-       double lo = 0;
+       double hi = 0.0;
+       double lo = 0.0;
        double c;
        double t;
        int32_t k=0;
index 85dbaac..e98c699 100644 (file)
@@ -90,7 +90,7 @@ pio2_3t =  8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
        double x,y[];
 #endif
 {
-       double z=0,w,t,r,fn;
+       double z=0.0,w,t,r,fn;
        double tx[3];
        int32_t e0,i,j,nx,n,ix,hx;
        u_int32_t low;
index 79783d9..5e7e9d8 100644 (file)
@@ -138,7 +138,7 @@ Q5  =  -2.01099218183624371326e-07; /* BE8AFDB7 6E09C32D */
        double x;
 #endif
 {
-       double y,hi,lo,c=0,t,e,hxs,hfx,r1;
+       double y,hi,lo,c=0.0,t,e,hxs,hfx,r1;
        int32_t k,xsb;
        u_int32_t hx;