From a831da792d627d9b351b9418dbc238cca7cd71fd Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 4 Sep 2011 17:23:39 +0200 Subject: [PATCH] fix MSVC compiler warning 'conditional expression is constant' --- acountry.c | 2 +- ares_init.c | 2 +- ares_private.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acountry.c b/acountry.c index d989018..e33e0f8 100644 --- a/acountry.c +++ b/acountry.c @@ -89,7 +89,7 @@ static int verbose = 0; #define TRACE(fmt) do { \ if (verbose > 0) \ printf fmt ; \ - } while (0) + } WHILE_FALSE static void wait_ares(ares_channel channel); static void callback(void *arg, int status, int timeouts, struct hostent *host); diff --git a/ares_init.c b/ares_init.c index 44d4cf9..dd59fed 100644 --- a/ares_init.c +++ b/ares_init.c @@ -1216,7 +1216,7 @@ static int init_by_defaults(ares_channel channel) goto error; } - } while(0); + } WHILE_FALSE; dot = strchr(hostname, '.'); if (dot) { diff --git a/ares_private.h b/ares_private.h index ff45ba7..3c56bbc 100644 --- a/ares_private.h +++ b/ares_private.h @@ -342,7 +342,7 @@ long ares__tvdiff(struct timeval t1, struct timeval t2); do { \ if ((c)->sock_state_cb) \ (c)->sock_state_cb((c)->sock_state_cb_data, (s), (r), (w)); \ - } while (0) + } WHILE_FALSE #ifdef CURLDEBUG /* This is low-level hard-hacking memory leak tracking and similar. Using the -- 2.7.4