From bea67a752df6f8e1dfce75592fb7c371e5c8a212 Mon Sep 17 00:00:00 2001 From: David McCullough Date: Fri, 9 Aug 2002 13:03:00 +0000 Subject: Fix a number of compile time warnings so that uClibc will build with -Werror using a 3.0.4 version of the sh-linux-gcc compiler. --- libc/stdio/printf.c | 2 +- libc/sysdeps/linux/common/syscalls.c | 1 + libc/sysdeps/linux/sh/longjmp.c | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'libc') diff --git a/libc/stdio/printf.c b/libc/stdio/printf.c index de50ed4e5..14e3f2173 100644 --- a/libc/stdio/printf.c +++ b/libc/stdio/printf.c @@ -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; diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c index 4acd0401c..ff7c38478 100644 --- a/libc/sysdeps/linux/common/syscalls.c +++ b/libc/sysdeps/linux/common/syscalls.c @@ -35,6 +35,7 @@ #include #include #include +#include //#define __NR_exit 1 diff --git a/libc/sysdeps/linux/sh/longjmp.c b/libc/sysdeps/linux/sh/longjmp.c index a17147d5f..dd4f684ad 100644 --- a/libc/sysdeps/linux/sh/longjmp.c +++ b/libc/sysdeps/linux/sh/longjmp.c @@ -24,6 +24,8 @@ #include #include +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"); -- cgit v1.2.3