From 0888fedd86a3fbd197c26a232d7e039e4606b846 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 24 Aug 2000 16:25:36 +0000 Subject: 2000-08-23 Werner Almesberger * libc/stdio/stdio.c (__swrite): declare "oldmode" only if it's used later (ifdef __SCLE) * libc/stdio/vfscanf.c (__svfscanf): declare "state" only if it's used later (ifdef MB_CAPABLE) * libc/string/memset.c (memset): removed unused variables "count" and "unaligned_addr" * libc/locale/locale.c (_setlocale_r): declare "lc_ctype" and "last_lc_ctype" only of they're used later (ifdef MB_CAPABLE) * libc/unix/getpwent.c (getpwnam): removed unused variables "uid" and "gid" --- newlib/libc/stdio/stdio.c | 5 ++++- newlib/libc/stdio/vfscanf.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'newlib/libc/stdio') diff --git a/newlib/libc/stdio/stdio.c b/newlib/libc/stdio/stdio.c index abb7c2335..ddebc8a39 100644 --- a/newlib/libc/stdio/stdio.c +++ b/newlib/libc/stdio/stdio.c @@ -66,7 +66,10 @@ __swrite (cookie, buf, n) int n; { register FILE *fp = (FILE *) cookie; - int w, oldmode=0; + int w; +#ifdef __SCLE + int oldmode=0; +#endif if (fp->_flags & __SAPP) (void) _lseek_r (fp->_data, fp->_file, (off_t) 0, SEEK_END); diff --git a/newlib/libc/stdio/vfscanf.c b/newlib/libc/stdio/vfscanf.c index e9c67fca1..7e88f1202 100644 --- a/newlib/libc/stdio/vfscanf.c +++ b/newlib/libc/stdio/vfscanf.c @@ -116,7 +116,9 @@ __svfscanf (fp, fmt0, ap) char ccltab[256]; /* character class table for %[...] */ char buf[BUF]; /* buffer for numeric conversions */ char *lptr; /* literal pointer */ +#ifdef MB_CAPABLE int state = 0; /* value to keep track of multibyte state */ +#endif short *sp; int *ip; -- cgit v1.2.3