From b206478328eb2cf2e8807b514dabb3069299a1e6 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 29 May 2007 21:26:59 +0000 Subject: Avoid more compiler warnings. * libc/stdlib/btowc.c: Add missing header. * libc/stdlib/getopt.c (getopt_internal): Initialize variable. * libc/stdlib/system.c (do_system) [__CYGWIN__]: Add declaration. * libc/stdlib/wctob.c: Add missing header. * libc/string/strcpy.c (strcpy): Avoid warnings. * libc/string/strrchr.c (strrchr): Likewise. --- newlib/libc/string/strcpy.c | 2 +- newlib/libc/string/strrchr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'newlib/libc/string') diff --git a/newlib/libc/string/strcpy.c b/newlib/libc/string/strcpy.c index 905b2541c..3dc3c33f6 100644 --- a/newlib/libc/string/strcpy.c +++ b/newlib/libc/string/strcpy.c @@ -92,7 +92,7 @@ _DEFUN (strcpy, (dst0, src0), src = (char*)aligned_src; } - while (*dst++ = *src++) + while ((*dst++ = *src++)) ; return dst0; #endif /* not PREFER_SIZE_OVER_SPEED */ diff --git a/newlib/libc/string/strrchr.c b/newlib/libc/string/strrchr.c index 36ef3ef2f..4f903afe2 100644 --- a/newlib/libc/string/strrchr.c +++ b/newlib/libc/string/strrchr.c @@ -44,7 +44,7 @@ _DEFUN (strrchr, (s, i), if (i) { - while (s=strchr(s, i)) + while ((s=strchr(s, i))) { last = s; s++; -- cgit v1.2.3