The variable is in larger scope because it is used as a constant, so
it's at the top of the function.
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;
/// 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;