Eric Blake wrote:
> And to memrchr like this:
Good point, the variable 'i' should better be unsigned, to avoid gcc warnings.
2008-04-27 Bruno Haible <[EMAIL PROTECTED]>
* lib/memchr.c (__memchr): Change type of 'i'.
* lib/memchr2.c (memchr2): Likewise.
--- lib/memchr.c.orig 2008-04-27 12:27:02.000000000 +0200
+++ lib/memchr.c 2008-04-27 12:24:41.000000000 +0200
@@ -100,7 +100,7 @@
repeated_c |= repeated_c << 31 << 1;
if (8 < sizeof (longword))
{
- int i;
+ size_t i;
for (i = 64; i < sizeof (longword) * 8; i *= 2)
{
--- lib/memchr2.c.orig 2008-04-27 12:27:02.000000000 +0200
+++ lib/memchr2.c 2008-04-27 12:24:56.000000000 +0200
@@ -87,7 +87,7 @@
repeated_c2 |= repeated_c2 << 31 << 1;
if (8 < sizeof (longword))
{
- int i;
+ size_t i;
for (i = 64; i < sizeof (longword) * 8; i *= 2)
{