]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2726] Suppress cppcheck
authorMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 12 Jun 2013 09:34:33 +0000 (11:34 +0200)
committerMichal 'vorner' Vaner <vorner@vorner.cz>
Wed, 12 Jun 2013 09:34:33 +0000 (11:34 +0200)
The variable is in larger scope because it is used as a constant, so
it's at the top of the function.

src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc

index 01e7da71a4552429ff9246b5f5f9a796d62bec9b..8aa913cffc1709d19c6b0db27c13978e2676e555 100644 (file)
@@ -126,7 +126,8 @@ bool
 Dhcpv4Srv::run() {
     while (!shutdown_) {
         /// @todo: calculate actual timeout once we have lease database
-        int timeout = 1000;
+        //cppcheck-suppress variableScope This is temporary anyway
+        const int timeout = 1000;
 
         // client's message and server's response
         Pkt4Ptr query;
index 4f5133cb18f41416476ff431fe8860acbf6c59ed..ef69a9405c863ad5cc7ba62cdf952fc8eb858bc5 100644 (file)
@@ -134,7 +134,8 @@ bool Dhcpv6Srv::run() {
         /// For now, we are just calling select for 1000 seconds. There
         /// were some issues reported on some systems when calling select()
         /// with too large values. Unfortunately, I don't recall the details.
-        int timeout = 1000;
+        //cppcheck-suppress variableScope This is temporary anyway
+        const int timeout = 1000;
 
         // client's message and server's response
         Pkt6Ptr query;