summaryrefslogtreecommitdiffstats
path: root/newlib
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2012-08-10 15:21:57 +0000
committerCorinna Vinschen <corinna@vinschen.de>2012-08-10 15:21:57 +0000
commitb2bde18ba5c1f6d6555083cba139bd813ebbd6e0 (patch)
treef3acf1717cdbbec66d0bd5839311dce2e541e008 /newlib
parent76c4e21b4919ca33b29dc60465334db204a1d56e (diff)
downloadcygnal-b2bde18ba5c1f6d6555083cba139bd813ebbd6e0.tar.gz
cygnal-b2bde18ba5c1f6d6555083cba139bd813ebbd6e0.tar.bz2
cygnal-b2bde18ba5c1f6d6555083cba139bd813ebbd6e0.zip
* libc/stdlib/btowc.c (btowc): Cast to avoid compiler warning.
* libc/search/hash_buf.c (__get_buf): Initialize local vars to avoid compiler warning. * libc/stdio/fgets.c (_fgets_r): Ditto. * libc/time/strftime.c (strftime): Ditto.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog8
-rw-r--r--newlib/libc/search/hash_buf.c4
-rw-r--r--newlib/libc/stdio/fgets.c2
-rw-r--r--newlib/libc/stdlib/btowc.c3
-rw-r--r--newlib/libc/time/strftime.c2
5 files changed, 14 insertions, 5 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 108d87b12..3072d9220 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,5 +1,13 @@
2012-08-10 Corinna Vinschen <vinschen@redhat.com>
+ * libc/stdlib/btowc.c (btowc): Cast to avoid compiler warning.
+ * libc/search/hash_buf.c (__get_buf): Initialize local vars to avoid
+ compiler warning.
+ * libc/stdio/fgets.c (_fgets_r): Ditto.
+ * libc/time/strftime.c (strftime): Ditto.
+
+2012-08-10 Corinna Vinschen <vinschen@redhat.com>
+
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Fix guard around state to
allow usage in !FLOATING_POINT && _WANT_IO_C99_FORMATS case.
diff --git a/newlib/libc/search/hash_buf.c b/newlib/libc/search/hash_buf.c
index 3dfc2069f..d50fc5720 100644
--- a/newlib/libc/search/hash_buf.c
+++ b/newlib/libc/search/hash_buf.c
@@ -119,8 +119,8 @@ __get_buf(hashp, addr, prev_bp, newpage)
{
BUFHEAD *bp;
__uint32_t is_disk_mask;
- int is_disk, segment_ndx;
- SEGMENT segp;
+ int is_disk, segment_ndx = 0;
+ SEGMENT segp = NULL;
is_disk = 0;
is_disk_mask = 0;
diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c
index 1644fba6a..319cfd576 100644
--- a/newlib/libc/stdio/fgets.c
+++ b/newlib/libc/stdio/fgets.c
@@ -102,7 +102,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
#ifdef __SCLE
if (fp->_flags & __SCLE)
{
- int c;
+ int c = 0;
/* Sorry, have to do it the slow way */
while (--n > 0 && (c = __sgetc_r (ptr, fp)) != EOF)
{
diff --git a/newlib/libc/stdlib/btowc.c b/newlib/libc/stdlib/btowc.c
index ec6c29152..354a1d6e1 100644
--- a/newlib/libc/stdlib/btowc.c
+++ b/newlib/libc/stdlib/btowc.c
@@ -23,7 +23,8 @@ btowc (int c)
_REENT_CHECK_MISC(_REENT);
- retval = __mbtowc (_REENT, &pwc, &b, 1, __locale_charset (), &mbs);
+ retval = __mbtowc (_REENT, &pwc, (const char *) &b, 1,
+ __locale_charset (), &mbs);
if (retval != 0 && retval != 1)
return WEOF;
diff --git a/newlib/libc/time/strftime.c b/newlib/libc/time/strftime.c
index 840e310db..2bcedb2a0 100644
--- a/newlib/libc/time/strftime.c
+++ b/newlib/libc/time/strftime.c
@@ -693,7 +693,7 @@ _DEFUN (strftime, (s, maxsize, format, tim_p),
#endif /* !_WANT_C99_TIME_FORMATS */
{
size_t count = 0;
- int i, len;
+ int i, len = 0;
const CHAR *ctloc;
#if defined (MAKE_WCSFTIME) && !defined (__HAVE_LOCALE_INFO_EXTENDED__)
CHAR ctlocbuf[CTLOCBUFLEN];