From: Amos Jeffries Date: Sun, 24 Jul 2011 13:26:17 +0000 (-0600) Subject: Fix GCC4.6 warning unused variables X-Git-Tag: SQUID_3_1_15~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab8e746e796a2626b7c11382b784d4d97c455410;p=thirdparty%2Fsquid.git Fix GCC4.6 warning unused variables --- diff --git a/compat/GnuRegex.c b/compat/GnuRegex.c index 5b93185ba4..983f4514fe 100644 --- a/compat/GnuRegex.c +++ b/compat/GnuRegex.c @@ -3730,6 +3730,9 @@ on_failure: POP_FAILURE_POINT(sdummy, pdummy, dummy_low_reg, dummy_high_reg, reg_dummy, reg_dummy, reg_info_dummy); + /* avoid GCC 4.6 set but unused variables warning. Does not matter here. */ + if (pdummy || sdummy) + (void)0; } /* Note fall through. */ diff --git a/src/ipcache.cc b/src/ipcache.cc index 451b1da9cb..95f33d757d 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -652,7 +652,6 @@ ipcacheHandleReply(void *data, char *reply) ipcacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_message) #endif { - int done; ipcache_entry *i; static_cast(data)->unwrap(&i); IpcacheStats.replies++; @@ -660,11 +659,10 @@ ipcacheHandleReply(void *data, rfc1035_rr * answers, int na, const char *error_m statHistCount(&statCounter.dns.svc_time, age); #if USE_DNSSERVERS - - done = ipcacheParse(i, reply); + ipcacheParse(i, reply); #else - done = ipcacheParse(i, answers, na, error_message); + int done = ipcacheParse(i, answers, na, error_message); /* If we have not produced either IPs or Error immediately, wait for recursion to finish. */ if (done != 0 || error_message != NULL)