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:
parent
a334e5ef72
commit
0888fedd86
@ -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>
|
2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>
|
||||||
|
|
||||||
* libc/stdlib/envlock.c: changed documented "__env_lock" and
|
* libc/stdlib/envlock.c: changed documented "__env_lock" and
|
||||||
|
@ -110,9 +110,6 @@ _DEFUN(_setlocale_r, (p, category, locale),
|
|||||||
int category _AND
|
int category _AND
|
||||||
_CONST char *locale)
|
_CONST char *locale)
|
||||||
{
|
{
|
||||||
static char lc_ctype[8] = "C";
|
|
||||||
static char last_lc_ctype[8] = "C";
|
|
||||||
|
|
||||||
#ifndef MB_CAPABLE
|
#ifndef MB_CAPABLE
|
||||||
if (locale)
|
if (locale)
|
||||||
{
|
{
|
||||||
@ -123,6 +120,9 @@ _DEFUN(_setlocale_r, (p, category, locale),
|
|||||||
}
|
}
|
||||||
return "C";
|
return "C";
|
||||||
#else
|
#else
|
||||||
|
static char lc_ctype[8] = "C";
|
||||||
|
static char last_lc_ctype[8] = "C";
|
||||||
|
|
||||||
if (locale)
|
if (locale)
|
||||||
{
|
{
|
||||||
if (category != LC_CTYPE)
|
if (category != LC_CTYPE)
|
||||||
|
@ -66,7 +66,10 @@ __swrite (cookie, buf, n)
|
|||||||
int n;
|
int n;
|
||||||
{
|
{
|
||||||
register FILE *fp = (FILE *) cookie;
|
register FILE *fp = (FILE *) cookie;
|
||||||
int w, oldmode=0;
|
int w;
|
||||||
|
#ifdef __SCLE
|
||||||
|
int oldmode=0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (fp->_flags & __SAPP)
|
if (fp->_flags & __SAPP)
|
||||||
(void) _lseek_r (fp->_data, fp->_file, (off_t) 0, SEEK_END);
|
(void) _lseek_r (fp->_data, fp->_file, (off_t) 0, SEEK_END);
|
||||||
|
@ -116,7 +116,9 @@ __svfscanf (fp, fmt0, ap)
|
|||||||
char ccltab[256]; /* character class table for %[...] */
|
char ccltab[256]; /* character class table for %[...] */
|
||||||
char buf[BUF]; /* buffer for numeric conversions */
|
char buf[BUF]; /* buffer for numeric conversions */
|
||||||
char *lptr; /* literal pointer */
|
char *lptr; /* literal pointer */
|
||||||
|
#ifdef MB_CAPABLE
|
||||||
int state = 0; /* value to keep track of multibyte state */
|
int state = 0; /* value to keep track of multibyte state */
|
||||||
|
#endif
|
||||||
|
|
||||||
short *sp;
|
short *sp;
|
||||||
int *ip;
|
int *ip;
|
||||||
|
@ -56,10 +56,9 @@ _DEFUN (memset, (m, c, n),
|
|||||||
return m;
|
return m;
|
||||||
#else
|
#else
|
||||||
char *s = (char *) m;
|
char *s = (char *) m;
|
||||||
int count, i;
|
int i;
|
||||||
unsigned long buffer;
|
unsigned long buffer;
|
||||||
unsigned long *aligned_addr;
|
unsigned long *aligned_addr;
|
||||||
unsigned char *unaligned_addr;
|
|
||||||
|
|
||||||
if (!TOO_SMALL (n) && !UNALIGNED (m))
|
if (!TOO_SMALL (n) && !UNALIGNED (m))
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@ getpwnam (name)
|
|||||||
const char *name;
|
const char *name;
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int uid, gid;
|
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
if ((fp = fopen ("/etc/passwd", "r")) == NULL)
|
if ((fp = fopen ("/etc/passwd", "r")) == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user