Just cleaning up a couple of warnings. Please note that
time_t on Win32 is now 64bit with VS2005 on all architectures,
process_answer() tried to pass it around as an int.
This is a diff against the latest release tarball (1.3.2).
Also, strdup() should be called using _strdup() these days.
-Brad
Index: /c-ares/ares_timeout.c
===================================================================
--- /c-ares/ares_timeout.c (revision 10830)
+++ /c-ares/ares_timeout.c (revision 10834)
@@ -33,5 +33,5 @@
struct query *query;
time_t now;
- int offset, min_offset;
+ time_t offset, min_offset;
/* No queries, no timeout (and no fetch of the current time). */
@@ -59,5 +59,5 @@
if (min_offset != -1 && (!maxtv || min_offset <= maxtv->tv_sec))
{
- tvbuf->tv_sec = min_offset;
+ tvbuf->tv_sec = (long)min_offset;
tvbuf->tv_usec = 0;
return tvbuf;
Index: /c-ares/ares_process.c
===================================================================
--- /c-ares/ares_process.c (revision 10830)
+++ /c-ares/ares_process.c (revision 10834)
@@ -74,5 +74,5 @@
static void process_timeouts(ares_channel channel, time_t now);
static void process_answer(ares_channel channel, unsigned char *abuf,
- int alen, int whichserver, int tcp, int now);
+ int alen, int whichserver, int tcp, time_t now);
static void handle_error(ares_channel channel, int whichserver, time_t now);
static struct query *next_server(ares_channel channel, struct query *query, time_t now);
@@ -350,5 +350,5 @@
/* Handle an answer from a server. */
static void process_answer(ares_channel channel, unsigned char *abuf,
- int alen, int whichserver, int tcp, int now)
+ int alen, int whichserver, int tcp, time_t now)
{
int id, tc, rcode;
Index: /c-ares/setup.h
===================================================================
--- /c-ares/setup.h (revision 10830)
+++ /c-ares/setup.h (revision 10834)
@@ -157,4 +157,5 @@
#define strncasecmp(a,b,c) ares_strncasecmp(a,b,c)
#define strcasecmp(a,b) ares_strcasecmp(a,b)
+#define strdup(a) _strdup(a)
#endif
Received on 2007-05-08