From: Michal 'vorner' Vaner Date: Wed, 12 Jun 2013 09:34:33 +0000 (+0200) Subject: [2726] Suppress cppcheck X-Git-Tag: bind10-1.2.0beta1-release~400^2~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49305bca03037ecf7cc2f91f75c4fd1c2d8bd5d1;p=thirdparty%2Fkea.git [2726] Suppress cppcheck The variable is in larger scope because it is used as a constant, so it's at the top of the function. --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 01e7da71a4..8aa913cffc 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -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; diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 4f5133cb18..ef69a9405c 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -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;