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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-10-09 16:24:56 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-10-09 16:24:56 +0400
commit633cf9b5dd846d6dbd5ab6102de24cf2a7c4582c (patch)
treeab11401550457b0fcb364dd9feca21487ab74351 /newlib/libc/string
parent657ca8442749cd79d2d49831ceae20e49e6b57f8 (diff)
* libc/string/memccpy.c (memccpy): Fix warning about signed-unsigned
comparison * libc/string/memchr.c (memchr): Ditto. * libc/string/memrchr.c (memrchr): Ditto. * libc/string/memset.c: (memset): Ditto. * libc/string/rawmemchr.c (rawmemchr): Ditto. * libc/string/local.h (__locale_cjk_lang): Fix "function declaration isn't a prototype" warning. * libc/string/strcasestr.c (strcasestr): Ditto. * libc/string/u_strerr.c (_user_strerror): Fix "unused parameter" warnings. * libc/string/rawmemchr.c (rawmemchr): Fix comment type "// ..." -> "/* ... */".
Diffstat (limited to 'newlib/libc/string')
-rw-r--r--newlib/libc/string/local.h2
-rw-r--r--newlib/libc/string/memccpy.c2
-rw-r--r--newlib/libc/string/memchr.c2
-rw-r--r--newlib/libc/string/memrchr.c2
-rw-r--r--newlib/libc/string/memset.c2
-rw-r--r--newlib/libc/string/rawmemchr.c4
-rw-r--r--newlib/libc/string/strcasestr.c5
-rw-r--r--newlib/libc/string/u_strerr.c5
8 files changed, 15 insertions, 9 deletions
diff --git a/newlib/libc/string/local.h b/newlib/libc/string/local.h
index dfe01d70b..babaad0e5 100644
--- a/newlib/libc/string/local.h
+++ b/newlib/libc/string/local.h
@@ -6,7 +6,7 @@ int _EXFUN (__wcwidth, (wint_t));
/* Defined in locale/locale.c. Returns a value != 0 if the current
language is assumed to use CJK fonts. */
-int __locale_cjk_lang ();
+int _EXFUN (__locale_cjk_lang, (void));
/*
Taken from glibc:
diff --git a/newlib/libc/string/memccpy.c b/newlib/libc/string/memccpy.c
index dded85781..332ed4660 100644
--- a/newlib/libc/string/memccpy.c
+++ b/newlib/libc/string/memccpy.c
@@ -98,7 +98,7 @@ _DEFUN (memccpy, (dst0, src0, endchar, len0),
then punt into the byte copy loop. This should be rare. */
if (!TOO_SMALL(len0) && !UNALIGNED (src, dst))
{
- int i;
+ unsigned int i;
unsigned long mask = 0;
aligned_dst = (long*)dst;
diff --git a/newlib/libc/string/memchr.c b/newlib/libc/string/memchr.c
index 13ed88186..db0af7cd7 100644
--- a/newlib/libc/string/memchr.c
+++ b/newlib/libc/string/memchr.c
@@ -80,7 +80,7 @@ _DEFUN (memchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memrchr.c b/newlib/libc/string/memrchr.c
index 42d9d147b..60dee42ed 100644
--- a/newlib/libc/string/memrchr.c
+++ b/newlib/libc/string/memrchr.c
@@ -80,7 +80,7 @@ _DEFUN (memrchr, (src_void, c, length),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
diff --git a/newlib/libc/string/memset.c b/newlib/libc/string/memset.c
index ee91b056e..b84e155f7 100644
--- a/newlib/libc/string/memset.c
+++ b/newlib/libc/string/memset.c
@@ -50,7 +50,7 @@ _DEFUN (memset, (m, c, n),
char *s = (char *) m;
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
- int i;
+ unsigned int i;
unsigned long buffer;
unsigned long *aligned_addr;
unsigned int d = c & 0xff; /* To avoid sign extension, copy C to an
diff --git a/newlib/libc/string/rawmemchr.c b/newlib/libc/string/rawmemchr.c
index a9e2acd85..4b5a4cdeb 100644
--- a/newlib/libc/string/rawmemchr.c
+++ b/newlib/libc/string/rawmemchr.c
@@ -77,7 +77,7 @@ _DEFUN (rawmemchr, (src_void, c),
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
unsigned long *asrc;
unsigned long mask;
- int i;
+ unsigned int i;
while (UNALIGNED (src))
{
@@ -110,7 +110,7 @@ _DEFUN (rawmemchr, (src_void, c),
src = (unsigned char *) asrc;
-#endif // !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__
+#endif /* !PREFER_SIZE_OVER_SPEED && !__OPTIMIZE_SIZE__ */
while (1)
{
diff --git a/newlib/libc/string/strcasestr.c b/newlib/libc/string/strcasestr.c
index 1bde1cdbf..8fff00b00 100644
--- a/newlib/libc/string/strcasestr.c
+++ b/newlib/libc/string/strcasestr.c
@@ -96,8 +96,9 @@ QUICKREF
* Find the first occurrence of find in s, ignore case.
*/
char *
-strcasestr(s, find)
- const char *s, *find;
+_DEFUN (strcasestr, (s, find),
+ _CONST char *s _AND
+ _CONST char *find)
{
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
diff --git a/newlib/libc/string/u_strerr.c b/newlib/libc/string/u_strerr.c
index 7d902feb7..2978df0cf 100644
--- a/newlib/libc/string/u_strerr.c
+++ b/newlib/libc/string/u_strerr.c
@@ -6,5 +6,10 @@ _DEFUN(_user_strerror, (errnum, internal, errptr),
int internal _AND
int *errptr)
{
+ /* prevent warning about unused parameters */
+ _CAST_VOID errnum;
+ _CAST_VOID internal;
+ _CAST_VOID errptr;
+
return 0;
}