2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>

* 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"
This commit is contained in:
Jeff Johnston 2000-08-24 16:25:36 +00:00
parent a334e5ef72
commit 0888fedd86
6 changed files with 23 additions and 7 deletions

View File

@ -1,3 +1,16 @@
2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
* 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"
2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
* libc/stdlib/envlock.c: changed documented "__env_lock" and

View File

@ -110,9 +110,6 @@ _DEFUN(_setlocale_r, (p, category, locale),
int category _AND
_CONST char *locale)
{
static char lc_ctype[8] = "C";
static char last_lc_ctype[8] = "C";
#ifndef MB_CAPABLE
if (locale)
{
@ -123,6 +120,9 @@ _DEFUN(_setlocale_r, (p, category, locale),
}
return "C";
#else
static char lc_ctype[8] = "C";
static char last_lc_ctype[8] = "C";
if (locale)
{
if (category != LC_CTYPE)

View File

@ -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);

View File

@ -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;

View File

@ -56,10 +56,9 @@ _DEFUN (memset, (m, c, n),
return m;
#else
char *s = (char *) m;
int count, i;
int i;
unsigned long buffer;
unsigned long *aligned_addr;
unsigned char *unaligned_addr;
if (!TOO_SMALL (n) && !UNALIGNED (m))
{

View File

@ -22,7 +22,6 @@ getpwnam (name)
const char *name;
{
FILE *fp;
int uid, gid;
char buf[1024];
if ((fp = fopen ("/etc/passwd", "r")) == NULL)