Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2000-08-24 20:25:36 +0400
committerJeff Johnston <jjohnstn@redhat.com>2000-08-24 20:25:36 +0400
commit0888fedd86a3fbd197c26a232d7e039e4606b846 (patch)
tree387c188a5cc3efa53db0e970a2e7a6b8161a2e57 /newlib
parenta334e5ef7267195d7ee285c89e9e4fa4d57347da (diff)
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"
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog13
-rw-r--r--newlib/libc/locale/locale.c6
-rw-r--r--newlib/libc/stdio/stdio.c5
-rw-r--r--newlib/libc/stdio/vfscanf.c2
-rw-r--r--newlib/libc/string/memset.c3
-rw-r--r--newlib/libc/unix/getpwent.c1
6 files changed, 23 insertions, 7 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index a9350e8b8..01ea6fbbc 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,18 @@
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
"__env_unlock" prototype from "void *" or "char *" to
"struct _reent *" to match real function. Also added include
diff --git a/newlib/libc/locale/locale.c b/newlib/libc/locale/locale.c
index 81d6ae2bc..e1f45335a 100644
--- a/newlib/libc/locale/locale.c
+++ b/newlib/libc/locale/locale.c
@@ -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)
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;
diff --git a/newlib/libc/string/memset.c b/newlib/libc/string/memset.c
index f6ec46b9a..a5890c884 100644
--- a/newlib/libc/string/memset.c
+++ b/newlib/libc/string/memset.c
@@ -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))
{
diff --git a/newlib/libc/unix/getpwent.c b/newlib/libc/unix/getpwent.c
index 23a35f49b..90ce30eaf 100644
--- a/newlib/libc/unix/getpwent.c
+++ b/newlib/libc/unix/getpwent.c
@@ -22,7 +22,6 @@ getpwnam (name)
const char *name;
{
FILE *fp;
- int uid, gid;
char buf[1024];
if ((fp = fopen ("/etc/passwd", "r")) == NULL)