]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: warning: variable 'total' set but not used [-Wunused-but-set-variable] 12748/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 14 Apr 2023 08:48:05 +0000 (10:48 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 1 May 2023 07:48:40 +0000 (09:48 +0200)
pdns/recursordist/ws-recursor.cc

index ae0cde21e1d5a7f5e74f10f00c629ec6bdb6af39..c25236ed5ab5583172639402b69bb7073bb242f8 100644 (file)
@@ -1267,9 +1267,7 @@ void RecursorWebServer::jsonstat(HttpRequest* req, HttpResponse* resp)
 
     typedef map<query_t, unsigned int> counts_t;
     counts_t counts;
-    unsigned int total = 0;
     for (const query_t& q : queries) {
-      total++;
       if (filter)
         counts[pair(getRegisteredName(q.first), q.second)]++;
       else
@@ -1313,9 +1311,7 @@ void RecursorWebServer::jsonstat(HttpRequest* req, HttpResponse* resp)
 
     typedef map<ComboAddress, unsigned int, ComboAddress::addressOnlyLessThan> counts_t;
     counts_t counts;
-    unsigned int total = 0;
     for (const ComboAddress& q : queries) {
-      total++;
       counts[q]++;
     }