Skip to content

Resolve "fix issues pointed out in 2.5.5 sanity checks"

Closes #3256 (closed).

  • eabe7142 convert mysql_ssl_set to mysql_options

  • ed9676f4 check result of mysql_options

    ... and throw exception if result is unfortunate.

    ... and check exceptions thrown in unit tests because it is important now to distinguish that the old exceptions are thrown instead of the new.

  • d28912e7 attempt to fix nonsense Wstringop-overread

    warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ reading 1 or more bytes from a region of size 0 [-Wstringop-overread]

    and Wsign-compare in the same file:

    test_control.cc:116:35: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long') and 'int' [-Wsign-compare]                                                                                                                         338ms
    test_control.cc:491:43: warning: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'const int' [-Wsign-compare]
    test_control.cc:529:50: warning: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'const int' [-Wsign-compare]
  • a8cac11b fix Wtype-limits warnings

    data.cc:905:21: warning: comparison is always true due to limited range of data type [-Wtype-limits]
    data.cc:905:48: warning: comparison is always false due to limited range of data type [-Wtype-limits]
    http_message_parser_base.cc:266:15: warning: comparison is always true due to limited range of data type [-Wtype-limits]
    http_message_parser_base.cc:271:17: warning: comparison is always true due to limited range of data type [-Wtype-limits]
  • 01ce1c79 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]
  • 0f046af0 add ChangeLog entry

Addressed all reported errors and warnings except for mysql_stmt_bind_param which in order to be migrated to mysql_stmt_bind_named_param needs a bit more work in establishing a mechanism to get all bound names for a statement. I can do it if the reviewer insists, or if this is also a blocker for compiling on some systems.

Edited by Andrei Pavel

Merge request reports