]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
lmdb-safe: remove leftover debug variable 12759/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 18 Apr 2023 00:28:46 +0000 (02:28 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Tue, 18 Apr 2023 00:28:48 +0000 (02:28 +0200)
In file included from ../../ext/lmdb-safe/lmdb-typed.cc:1:
../../ext/lmdb-safe/lmdb-typed.hh:656:11: warning: variable 'scanned' set but not used [-Wunused-but-set-variable]
      int scanned = 0;
          ^

ext/lmdb-safe/lmdb-typed.hh

index bfaffa76effcd6894a27a5eb1423011cf66947f1..a0e2cefb0d8dd10f0844301bef315f0633052d8d 100644 (file)
@@ -653,9 +653,7 @@ public:
 
       int rc = cursor.get(out, id,  MDB_SET_RANGE);
 
-      int scanned = 0;
       while (rc == 0) {
-        scanned++;
         auto sout = out.getNoStripHeader<std::string>(); // FIXME: this (and many others) could probably be string_view
         auto thiskey = getKeyFromCombinedKey(out);
         auto sthiskey = thiskey.getNoStripHeader<std::string>();
@@ -673,7 +671,6 @@ public:
         rc = cursor.get(out, id, MDB_NEXT);
       }
 
-      // std::cerr<<"get_multi scanned="<<scanned<<std::endl;
       if (rc != 0 && rc != MDB_NOTFOUND) {
         throw std::runtime_error("error during get_multi");
       }