]> git.wh0rd.org - patches.git/blame - glibc-fix-generic-strchr-signed-warning.patch
more random patches. who knows.
[patches.git] / glibc-fix-generic-strchr-signed-warning.patch
CommitLineData
5e993f12 12006-05-15 Mike Frysinger <vapier@gentoo.org>
2
3 * string/strchr.c: Add cast to avoid warning.
4
5--- string/strchr.c
6+++ string/strchr.c
7@@ -42,8 +42,8 @@ strchr (s, c_in)
8
9 /* Handle the first few characters by reading one character at a time.
10 Do this until CHAR_PTR is aligned on a longword boundary. */
11- for (char_ptr = s; ((unsigned long int) char_ptr
12- & (sizeof (longword) - 1)) != 0;
13+ for (char_ptr = (const unsigned char *) s;
14+ ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
15 ++char_ptr)
16 if (*char_ptr == c)
17 return (void *) char_ptr;