- ctrl_dhcp4_srv_unittest.cc:145:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
- ctrl_dhcp4_srv_unittest.cc:2172:28: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp4_srv_unittest.cc:2191:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp4_srv_unittest.cc:2295:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp4_srv_unittest.cc:2352:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
- ctrl_dhcp4_srv_unittest.cc:2402:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
- ctrl_dhcp6_srv_unittest.cc:116:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
- ctrl_dhcp6_srv_unittest.cc:181:6: warning: extra ‘;’ after in-class function definition [-Wextra-semi]
- ctrl_dhcp6_srv_unittest.cc:264:10: warning: ‘virtual void {anonymous}::CtrlChannelDhcpv6SrvTest::reset()’ can be marked override [-Wsuggest-override]
- ctrl_dhcp6_srv_unittest.cc:2210:28: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp6_srv_unittest.cc:2229:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp6_srv_unittest.cc:2333:33: warning: comparison of integer expressions of different signedness: ‘std::streamoff’ {aka ‘long int’} and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
- ctrl_dhcp6_srv_unittest.cc:2390:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
- ctrl_dhcp6_srv_unittest.cc:2440:28: warning: declaration of ‘timeout’ shadows a previous local [-Wshadow]
- dhcp6_srv_unittest.cc:2420:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
- dhcp6_srv_unittest.cc:2440:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
- dhcp6_srv_unittest.cc:2932:28: warning: useless cast to type ‘const uint8_t*’ {aka ‘const unsigned char*’} [-Wuseless-cast]
- dhcp6_srv_unittest.cc:2964:26: warning: useless cast to type ‘const uint8_t*’ {aka ‘const unsigned char*’} [-Wuseless-cast]
IfaceMgr::instance().clearIfaces();
IfaceMgr::instance().closeSockets();
IfaceMgr::instance().detectIfaces();
- };
+ }
/// @brief Returns pointer to the server's IO service.
///
// This is the desired size of the command sent to the server (1MB). The
// actual size sent will be slightly greater than that.
- const size_t command_size = 1024 * 1000;
+ const ssize_t command_size = 1024 * 1000;
while (command.tellp() < command_size) {
// Remember the response size so as we know when we should stop
// receiving.
- const size_t long_response_size = reference_response.size();
+ const ssize_t long_response_size = reference_response.size();
// Create the client and connect it to the server.
boost::scoped_ptr<UnixControlClient> client(new UnixControlClient());
// Let's wait up to 15s for the server's response. The response
// should arrive sooner assuming that the timeout mechanism for
// the server is working properly.
- const unsigned int timeout = 15;
- ASSERT_TRUE(client->getResponse(response, timeout));
+ const unsigned int response_timeout = 15;
+ ASSERT_TRUE(client->getResponse(response, response_timeout));
// Explicitly close the client's connection.
client->disconnectFromServer();
// Let's wait up to 15s for the server's response. The response
// should arrive sooner assuming that the timeout mechanism for
// the server is working properly.
- const unsigned int timeout = 15;
- ASSERT_TRUE(client->getResponse(response, timeout));
+ const unsigned int response_timeout = 15;
+ ASSERT_TRUE(client->getResponse(response, response_timeout));
// Explicitly close the client's connection.
client->disconnectFromServer();
CommandMgr::instance().setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
reset();
- };
+ }
/// @brief Reset hooks data
///
IfaceMgr::instance().clearIfaces();
IfaceMgr::instance().closeSockets();
IfaceMgr::instance().detectIfaces();
- };
+ }
/// @brief Returns pointer to the server's IO service.
///
}
/// @brief Reset
- void reset() {
+ void reset() override {
CtrlDhcpv6SrvTest::reset();
// Remove unix socket file
// This is the desired size of the command sent to the server (1MB). The
// actual size sent will be slightly greater than that.
- const size_t command_size = 1024 * 1000;
+ const ssize_t command_size = 1024 * 1000;
while (command.tellp() < command_size) {
// Remember the response size so as we know when we should stop
// receiving.
- const size_t long_response_size = reference_response.size();
+ const ssize_t long_response_size = reference_response.size();
// Create the client and connect it to the server.
boost::scoped_ptr<UnixControlClient> client(new UnixControlClient());
// Let's wait up to 15s for the server's response. The response
// should arrive sooner assuming that the timeout mechanism for
// the server is working properly.
- const unsigned int timeout = 15;
- ASSERT_TRUE(client->getResponse(response, timeout));
+ const unsigned int response_timeout = 15;
+ ASSERT_TRUE(client->getResponse(response, response_timeout));
// Explicitly close the client's connection.
client->disconnectFromServer();
// Let's wait up to 15s for the server's response. The response
// should arrive sooner assuming that the timeout mechanism for
// the server is working properly.
- const unsigned int timeout = 15;
- ASSERT_TRUE(client->getResponse(response, timeout));
+ const unsigned int response_timeout = 15;
+ ASSERT_TRUE(client->getResponse(response, response_timeout));
// Explicitly close the client's connection.
client->disconnectFromServer();
DHCPV6_INFORMATION_REQUEST
};
// Iterate over these messages and make sure they are discarded.
- for (int i = 0; i < sizeof(not_allowed_unicast); ++i) {
+ for (size_t i = 0; i < sizeof(not_allowed_unicast); ++i) {
Pkt6Ptr msg = Pkt6Ptr(new Pkt6(not_allowed_unicast[i], 1234));
msg->setLocalAddr(IOAddress("2001:db8:1::1"));
EXPECT_FALSE(srv.testUnicast(msg))
};
// Iterate over these messages and check that they are accepted being
// sent to unicast.
- for (int i = 0; i < sizeof(allowed_unicast); ++i) {
+ for (size_t i = 0; i < sizeof(allowed_unicast); ++i) {
Pkt6Ptr msg = Pkt6Ptr(new Pkt6(allowed_unicast[i], 1234));
msg->setLocalAddr(IOAddress("2001:db8:1::1"));
msg->addOption(srv.getServerID());
// Simulate that we have received that traffic
sol->pack();
EXPECT_EQ(DHCPV6_RELAY_FORW, sol->getBuffer()[0]);
- Pkt6Ptr query(new Pkt6(static_cast<const uint8_t*>
- (sol->getBuffer().getData()),
+ Pkt6Ptr query(new Pkt6(sol->getBuffer().getData(),
sol->getBuffer().getLength()));
query->setRemoteAddr(sol->getRemoteAddr());
query->setRemotePort(sol->getRemotePort());
EXPECT_EQ(DHCPV6_RELAY_REPL, rsp->getBuffer()[0]);
// Get Advertise
- Pkt6Ptr adv(new Pkt6(static_cast<const uint8_t*>
- (rsp->getBuffer().getData()),
+ Pkt6Ptr adv(new Pkt6(rsp->getBuffer().getData(),
rsp->getBuffer().getLength()));
adv->unpack();