about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-22 06:47:33 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-22 06:47:33 +0000
commit59776aef0bdc5ade9cbfdb48a0fb6228b0aef97e (patch)
treeef3a00add19ce58b0c7e1b15e0d42bc9983a4b62
parentbd2c234116f0a5cb022b9566266dc2b29eff9311 (diff)
downloadglibc-59776aef0bdc5ade9cbfdb48a0fb6228b0aef97e.tar.gz
glibc-59776aef0bdc5ade9cbfdb48a0fb6228b0aef97e.tar.xz
glibc-59776aef0bdc5ade9cbfdb48a0fb6228b0aef97e.zip
2006-05-15  Mike Frysinger  <vapier@gentoo.org>
	[BZ #2751]
	* string/strchr.c: Add cast to avoid warning.
-rw-r--r--ChangeLog5
-rw-r--r--string/strchr.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 64da78b09f..2adc7bb44f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-15  Mike Frysinger  <vapier@gentoo.org>
+
+	[BZ #2751]
+	* string/strchr.c: Add cast to avoid warning.
+
 2006-08-21  Ulrich Drepper  <drepper@redhat.com>
 
 	* malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit
diff --git a/string/strchr.c b/string/strchr.c
index c8b7969e85..5afd364533 100644
--- a/string/strchr.c
+++ b/string/strchr.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,93,94,95,96,97,99,2000,03 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993-1997,1999,2000,2003,2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
@@ -42,8 +43,8 @@ strchr (s, c_in)
 
   /* Handle the first few characters by reading one character at a time.
      Do this until CHAR_PTR is aligned on a longword boundary.  */
-  for (char_ptr = s; ((unsigned long int) char_ptr
-		      & (sizeof (longword) - 1)) != 0;
+  for (char_ptr = (const unsigned char *) s;
+       ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
        ++char_ptr)
     if (*char_ptr == c)
       return (void *) char_ptr;