Browse Source

[2544] Silence the false positive reported by cppcheck.

The cppcheck seems to have difficulty to figure out that the variable is
set and initialized within a loop and that it is read within another
loop iteration.
Marcin Siodelski 12 years ago
parent
commit
f64ff7004d

+ 1 - 0
src/bin/dhcp4/tests/config_parser_unittest.cc

@@ -131,6 +131,7 @@ public:
             if (!first) {
                 stream << ", ";
             } else {
+                // cppcheck-suppress unreadVariable
                 first = false;
             }
             if (param.first == "name") {

+ 1 - 0
src/bin/dhcp6/tests/config_parser_unittest.cc

@@ -97,6 +97,7 @@ public:
             if (!first) {
                 stream << ", ";
             } else {
+                // cppcheck-suppress unreadVariable
                 first = false;
             }
             if (param.first == "name") {