summaryrefslogtreecommitdiffstats
path: root/src/lib/mysql
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2024-05-16 16:15:01 +0200
committerAndrei Pavel <andrei@isc.org>2024-05-20 22:28:17 +0200
commit3e4deddd5f086681d12cf471d44efa03e40a2c7f (patch)
treefbd4f880083e7f15d3c310962afb59f9c4ecbdad /src/lib/mysql
parent[#3256] fix Wtype-limits warnings (diff)
downloadkea-3e4deddd5f086681d12cf471d44efa03e40a2c7f.tar.xz
kea-3e4deddd5f086681d12cf471d44efa03e40a2c7f.zip
[#3256] fix common warnings across compilers
``` io_service_thread_pool_unittests.cc:24:12: warning: unused variable 'TEST_TIMEOUT' [-Wunused-const-variable] mysql_connection_unittest.cc:217:75: warning: declaration of ‘out_bindings’ shadows a previous local [-Wshadow] mysql_host_data_source.cc:171:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:202:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:220:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:254:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:422:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:554:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:579:30: warning: useless cast to type ‘isc::dhcp::SubnetID’ {aka ‘unsigned int’} [-Wuseless-cast] mysql_host_data_source.cc:586:30: warning: useless cast to type ‘isc::dhcp::SubnetID’ {aka ‘unsigned int’} [-Wuseless-cast] mysql_host_data_source.cc:674:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:714:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:1313:18: warning: 'processFetchedData' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_host_data_source.cc:1353:37: warning: 'createBindForReceive' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_host_data_source.cc:1371:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:1456:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:1487:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:1508:18: warning: 'processFetchedData' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_host_data_source.cc:1542:37: warning: 'createBindForReceive' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_host_data_source.cc:1583:6: warning: extra ';' after member function definition [-Wextra-semi] mysql_host_data_source.cc:1803:25: warning: unused variable 'OPTION_ID_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1804:25: warning: unused variable 'CODE_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1805:25: warning: unused variable 'VALUE_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1806:25: warning: unused variable 'FORMATTED_VALUE_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1807:25: warning: unused variable 'SPACE_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1808:25: warning: unused variable 'PERSISTENT_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1809:25: warning: unused variable 'CANCELLED_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1810:25: warning: unused variable 'USER_CONTEXT_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1811:25: warning: unused variable 'DHCP_SUBNET_ID_COL' [-Wunused-const-variable] mysql_host_data_source.cc:1812:25: warning: unused variable 'HOST_ID_COL' [-Wunused-const-variable] mysql_host_data_source.cc:3222:24: warning: useless cast to type ‘char*’ [-Wuseless-cast] mysql_host_data_source.cc:3385:24: warning: useless cast to type ‘char*’ [-Wuseless-cast] mysql_host_data_source.cc:3426:24: warning: useless cast to type ‘char*’ [-Wuseless-cast] mysql_lease_mgr.cc:89:14: warning: unused variable 'HOSTNAME_MAX_LEN' [-Wunused-const-variable] mysql_lease_mgr.cc:95:14: warning: unused variable 'ADDRESS6_TEXT_MAX_LEN' [-Wunused-const-variable] mysql_lease_mgr.cc:98:14: warning: unused variable 'USER_CONTEXT_MAX_LEN' [-Wunused-const-variable] mysql_lease_mgr.cc:544:29: warning: useless cast to type ‘isc::db::my_bool*’ {aka ‘bool*’} [-Wuseless-cast] mysql_lease_mgr.cc:1929:10: warning: 'start' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_lease_mgr.cc:2010:30: warning: useless cast to type ‘isc::dhcp::SubnetID’ {aka ‘unsigned int’} [-Wuseless-cast] mysql_lease_mgr.cc:2020:10: warning: 'getNextRow' overrides a member function but is not marked 'override' [-Wsuggest-override] mysql_lease_mgr.cc:3427:13: warning: useless cast to type ‘uint64_t’ {aka ‘long unsigned int’} [-Wuseless-cast] mysql_lease_mgr.cc:4114:23: warning: variable length arrays are a C99 feature [-Wvla-extension] mysql_lease_mgr.cc:4226:23: warning: variable length arrays are a C99 feature [-Wvla-extension] option_opaque_data_tuples_unittest.cc:533:32: warning: zero size arrays are an extension [-Wzero-length-array] option_opaque_data_tuples_unittest.cc:552:32: warning: zero size arrays are an extension [-Wzero-length-array] option_opaque_data_tuples_unittest.cc:572:32: warning: zero size arrays are an extension [-Wzero-length-array] tcp_connection.cc:28:14: warning: unused variable 'MAX_LOGGED_MESSAGE_SIZE' [-Wunused-const-variable] test_control.cc:1826:23: warning: useless cast to type ‘class isc::asiolink::IOAddress’ [-Wuseless-cast] test_control.cc:1830:24: warning: useless cast to type ‘class isc::asiolink::IOAddress’ [-Wuseless-cast] test_control.cc:1871:34: warning: useless cast to type ‘class isc::asiolink::IOAddress’ [-Wuseless-cast] test_control.cc:1873:30: warning: useless cast to type ‘class isc::asiolink::IOAddress’ [-Wuseless-cast] ../../../src/lib/http/http_message_parser_base.h:26:45: warning: extra ‘;’ after in-class function definition [-Wextra-semi] ../../../src/lib/http/http_message_parser_base.h:174:18: warning: ‘virtual void isc::http::HttpMessageParserBase::defineEvents()’ can be marked override [-Wsuggest-override] ../../../src/lib/http/http_message_parser_base.h:177:18: warning: ‘virtual void isc::http::HttpMessageParserBase::verifyEvents()’ can be marked override [-Wsuggest-override] ../../../src/lib/http/http_message_parser_base.h:180:18: warning: ‘virtual void isc::http::HttpMessageParserBase::defineStates()’ can be marked override [-Wsuggest-override] ../../../src/lib/http/http_message_parser_base.h:233:18: warning: ‘virtual void isc::http::HttpMessageParserBase::onModelFailure(const string&)’ can be marked override [-Wsuggest-override] ```
Diffstat (limited to 'src/lib/mysql')
-rw-r--r--src/lib/mysql/tests/mysql_connection_unittest.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/lib/mysql/tests/mysql_connection_unittest.cc b/src/lib/mysql/tests/mysql_connection_unittest.cc
index 0591192ab7..c43a20663b 100644
--- a/src/lib/mysql/tests/mysql_connection_unittest.cc
+++ b/src/lib/mysql/tests/mysql_connection_unittest.cc
@@ -214,38 +214,38 @@ public:
// returned row the lambda provided as 4th argument should be executed.
ASSERT_NO_THROW_LOG(conn_.selectQuery(MySqlConnectionTest::GET_BY_INT_VALUE,
bindings, out_bindings,
- [&](MySqlBindingCollection& out_bindings) {
+ [&](MySqlBindingCollection& captured_out_bindings) {
// Compare received data with input data assuming they are both non-null.
- if (!out_bindings[0]->amNull() && !in_bindings[0]->amNull()) {
+ if (!captured_out_bindings[0]->amNull() && !in_bindings[0]->amNull()) {
EXPECT_EQ(static_cast<int>(in_bindings[0]->getInteger<uint8_t>()),
- static_cast<int>(out_bindings[0]->getInteger<uint8_t>()));
+ static_cast<int>(captured_out_bindings[0]->getInteger<uint8_t>()));
}
- if (!out_bindings[1]->amNull() && !in_bindings[1]->amNull()) {
+ if (!captured_out_bindings[1]->amNull() && !in_bindings[1]->amNull()) {
EXPECT_EQ(in_bindings[1]->getInteger<uint32_t>(),
- out_bindings[1]->getInteger<uint32_t>());
+ captured_out_bindings[1]->getInteger<uint32_t>());
}
- if (!out_bindings[2]->amNull() && !in_bindings[2]->amNull()) {
+ if (!captured_out_bindings[2]->amNull() && !in_bindings[2]->amNull()) {
EXPECT_EQ(in_bindings[2]->getInteger<int64_t>(),
- out_bindings[2]->getInteger<int64_t>());
+ captured_out_bindings[2]->getInteger<int64_t>());
}
- if (!out_bindings[3]->amNull() && !in_bindings[3]->amNull()) {
+ if (!captured_out_bindings[3]->amNull() && !in_bindings[3]->amNull()) {
EXPECT_EQ(in_bindings[3]->getString(),
- out_bindings[3]->getString());
+ captured_out_bindings[3]->getString());
}
- if (!out_bindings[4]->amNull() && !in_bindings[4]->amNull()) {
+ if (!captured_out_bindings[4]->amNull() && !in_bindings[4]->amNull()) {
EXPECT_EQ(in_bindings[4]->getBlob(),
- out_bindings[4]->getBlob());
+ captured_out_bindings[4]->getBlob());
}
- if (!out_bindings[5]->amNull() && !in_bindings[5]->amNull()) {
+ if (!captured_out_bindings[5]->amNull() && !in_bindings[5]->amNull()) {
EXPECT_TRUE(in_bindings[5]->getTimestamp() ==
- out_bindings[5]->getTimestamp());
+ captured_out_bindings[5]->getTimestamp());
}
}));