Subject: win32 warning fix on 1.4.0

win32 warning fix on 1.4.0

From: Brad House <brad_at_mainstreetsoftworks.com>
Date: Wed, 20 Jun 2007 08:47:11 -0400

An integer truncation warning appeared when compiling for win32.
It's guaranteed that the 'short' only cycles between 0 and 255, so
the attached patch shuts up that warning. (Note, the variable
type shouldn't be changed as you'd end up with an endless loop
as you'd overflow the bounds of the integer type).

-Brad

Index: /c-ares/ares_init.c
===================================================================
--- /c-ares/ares_init.c
+++ /c-ares/ares_init.c
@@ -1320,5 +1320,5 @@
   state = &key->state[0];
   for(counter = 0; counter < 256; counter++)
- state[counter] = counter;
+ state[counter] = counter & 0xFF;
   key->x = 0;
   key->y = 0;
Received on 2007-06-20