]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2544] Silence the false positive reported by cppcheck.
authorMarcin Siodelski <marcin@isc.org>
Wed, 19 Dec 2012 16:14:21 +0000 (17:14 +0100)
committerMarcin Siodelski <marcin@isc.org>
Wed, 19 Dec 2012 16:14:21 +0000 (17:14 +0100)
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.

src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc

index b88cdcc4df97416ac9b7805bdcd05e8a29ee386d..3dd75d72960b91ca466b9830b8008f90820bb148 100644 (file)
@@ -131,6 +131,7 @@ public:
             if (!first) {
                 stream << ", ";
             } else {
+                // cppcheck-suppress unreadVariable
                 first = false;
             }
             if (param.first == "name") {
index 144033806913bbcce93d84e01c8ba9f12b423825..812eb680ff191c76f469860742056d49da2d9e15 100644 (file)
@@ -97,6 +97,7 @@ public:
             if (!first) {
                 stream << ", ";
             } else {
+                // cppcheck-suppress unreadVariable
                 first = false;
             }
             if (param.first == "name") {