Browse Source

[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.
Mukund Sivaraman 12 years ago
parent
commit
94cb9c2b88
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/datasrc/tests/memory/rdata_serialization_unittest.cc

+ 3 - 0
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