next_id is an unsigned short, typecast the assign to prevent picky compilers
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Feb 2004 07:57:44 +0000 (07:57 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 23 Feb 2004 07:57:44 +0000 (07:57 +0000)
to warn

ares_init.c

index 5277674..88d60b4 100644 (file)
@@ -136,7 +136,8 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
    * field, so there's not much to be done about that.
    */
   gettimeofday(&tv, NULL);
-  channel->next_id = (tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff;
+  channel->next_id = (unsigned short)
+    (tv.tv_sec ^ tv.tv_usec ^ getpid()) & 0xffff;
 
   channel->queries = NULL;