From cc71e7501cb623b2d600c47dbe10a31dcf6e8fcf Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 28 Mar 2019 12:07:20 +0100 Subject: [PATCH] post-merge: -Werror fixes in 10.2 --- cmake/mariadb_connector_c.cmake | 5 +++++ sql/spatial.cc | 12 ++++++------ storage/innobase/buf/buf0dump.cc | 2 +- strings/json_lib.c | 4 ++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/cmake/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake index 368a6cc8da538..0f08c3464c4a8 100644 --- a/cmake/mariadb_connector_c.cmake +++ b/cmake/mariadb_connector_c.cmake @@ -37,3 +37,8 @@ SET(CLIENT_PLUGIN_PVIO_SOCKET STATIC) MESSAGE("== Configuring MariaDB Connector/C") ADD_SUBDIRECTORY(libmariadb) + +#remove after merging libmariadb > v3.0.9 +IF(TARGET caching_sha2_password AND CMAKE_C_FLAGS_DEBUG MATCHES "-Werror") + SET_PROPERTY(TARGET caching_sha2_password APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-unused-function) +ENDIF() diff --git a/sql/spatial.cc b/sql/spatial.cc index 2aca528dd1541..5f045f8cbfa50 100644 --- a/sql/spatial.cc +++ b/sql/spatial.cc @@ -238,17 +238,17 @@ int Geometry::as_wkt(String *wkt, const char **end) static const uchar type_keyname[]= "type"; -static const int type_keyname_len= 4; +static const uint type_keyname_len= 4; static const uchar coord_keyname[]= "coordinates"; -static const int coord_keyname_len= 11; +static const uint coord_keyname_len= 11; static const uchar geometries_keyname[]= "geometries"; -static const int geometries_keyname_len= 10; +static const uint geometries_keyname_len= 10; static const uchar features_keyname[]= "features"; -static const int features_keyname_len= 8; +static const uint features_keyname_len= 8; static const uchar geometry_keyname[]= "geometry"; -static const int geometry_keyname_len= 8; +static const uint geometry_keyname_len= 8; -static const int max_keyname_len= 11; /*'coordinates' keyname is the longest.*/ +static const uint max_keyname_len= 11; /*'coordinates' keyname is the longest.*/ static const uchar feature_type[]= "feature"; static const int feature_type_len= 7; diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index ed2131bdcee18..fa6754fa0652b 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -392,7 +392,7 @@ buf_dump( if (SHUTTING_DOWN() && !(j % 1024)) { service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, "Dumping buffer pool " - ULINTPF "/" ULINTPF ", " + ULINTPF "/%lu, " "page " ULINTPF "/" ULINTPF, i + 1, srv_buf_pool_instances, j + 1, n_pages); diff --git a/strings/json_lib.c b/strings/json_lib.c index 394517a4ab693..3ce9b0c503fa8 100644 --- a/strings/json_lib.c +++ b/strings/json_lib.c @@ -1409,7 +1409,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state) if (!json_key_matches(je, &key_name)) continue; } - if (cur_step - state->paths[p_c].last_step == state->cur_depth) + if (cur_step == state->paths[p_c].last_step + state->cur_depth) path_found= TRUE; else { @@ -1442,7 +1442,7 @@ int json_find_paths_next(json_engine_t *je, json_find_paths_t *state) cur_step->n_item == state->array_counters[state->cur_depth]) { /* Array item matches. */ - if (cur_step - state->paths[p_c].last_step == state->cur_depth) + if (cur_step == state->paths[p_c].last_step + state->cur_depth) path_found= TRUE; else {