]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2507] Add cppcheck suppressions
authorMukund Sivaraman <muks@isc.org>
Wed, 19 Dec 2012 04:57:06 +0000 (10:27 +0530)
committerMukund Sivaraman <muks@isc.org>
Wed, 19 Dec 2012 04:57:06 +0000 (10:27 +0530)
These are in the unit tests. The reports are false positives, as
address of current is taken earlier in the code and used within
the reader.*() codepaths.

src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc

index 58c6cb1527b6697a4ebd120823b6da92ad078d41..4f82f7b421171b2702ff807e294ce3ea2d029a65 100644 (file)
@@ -409,6 +409,7 @@ public:
         reader.nextSig();
         reader.rewind();
         // Do the actual rendering
+        // cppcheck-suppress unreadVariable
         current = &renderer;
         reader.iterate();
         renderer.writeName(dummyName2());
@@ -484,6 +485,8 @@ public:
         current = NULL;
         reader.iterateAllSigs();
         // Now return the renderer and render the rest of the data
+        // cppcheck-suppress redundantAssignment
+        // cppcheck-suppress unreadVariable
         current = &renderer;
         reader.iterate();
         // Now, this should not break anything and should be valid, but should