summaryrefslogtreecommitdiffstats
path: root/newlib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc')
-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
5 files changed, 10 insertions, 7 deletions
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)