From: Mukund Sivaraman Date: Wed, 19 Dec 2012 04:57:06 +0000 (+0530) Subject: [2507] Add cppcheck suppressions X-Git-Tag: bind10-1.0.0-rc-release~76^2~21^2~2^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94cb9c2b880da087af403da4b5b765ccd77ad594;p=thirdparty%2Fkea.git [2507] Add cppcheck suppressions 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. --- diff --git a/src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc b/src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc index 58c6cb1527..4f82f7b421 100644 --- a/src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc +++ b/src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc @@ -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