summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-12-02 21:50:08 +0200
committerMonty <monty@mariadb.org>2017-12-03 13:58:36 +0200
commit60df17e95ad7239e087f2c71a16b79a129755032 (patch)
treea00cb03ec23f7fb9e7f9000164305bde03af90a5
parent52ca07c2a0977f74ccfb56363e4158f0bd0ad3a0 (diff)
downloadmariadb-git-60df17e95ad7239e087f2c71a16b79a129755032.tar.gz
Remove compiler warnings
-rw-r--r--extra/mariabackup/xtrabackup.cc2
-rw-r--r--plugin/simple_password_check/simple_password_check.c5
-rw-r--r--sql/ha_partition.cc2
-rw-r--r--sql/ha_partition.h2
-rw-r--r--storage/mroonga/lib/mrn_context_pool.cpp2
-rw-r--r--strings/json_lib.c4
6 files changed, 9 insertions, 8 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index d64060dadcc..9648bce7f53 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -3022,7 +3022,7 @@ xb_validate_name(
exit(EXIT_FAILURE);
}
p = strpbrk(name, "/\\~");
- if (p && p - name < NAME_LEN) {
+ if (p && (uint) (p - name) < NAME_LEN) {
msg("mariabackup: name `%s` is not valid.\n", name);
exit(EXIT_FAILURE);
}
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index dd4051e8169..445ed621e74 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -15,6 +15,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <mysqld_error.h>
+#include <my_attribute.h>
#include <mysql/plugin_password_validation.h>
#include <ctype.h>
#include <string.h>
@@ -50,7 +51,9 @@ static int validate(MYSQL_CONST_LEX_STRING *username,
others < min_others;
}
-static void fix_min_length(MYSQL_THD thd, struct st_mysql_sys_var *var,
+static void fix_min_length(MYSQL_THD thd __attribute__((unused)),
+ struct st_mysql_sys_var *var
+ __attribute__((unused)),
void *var_ptr, const void *save)
{
unsigned int new_min_length;
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 0d5793c180b..2c0d313fd2b 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -223,8 +223,6 @@ static uint alter_table_flags(uint flags __attribute__((unused)))
HA_FAST_CHANGE_PARTITION);
}
-const uint32 ha_partition::NO_CURRENT_PART_ID= NOT_A_PARTITION_ID;
-
/*
Constructor method
diff --git a/sql/ha_partition.h b/sql/ha_partition.h
index fe4f8628891..a13d9bd7618 100644
--- a/sql/ha_partition.h
+++ b/sql/ha_partition.h
@@ -786,7 +786,7 @@ private:
Query_cache_block_table
**block_table,
handler *file, uint *n);
- static const uint NO_CURRENT_PART_ID;
+ static const uint NO_CURRENT_PART_ID= NOT_A_PARTITION_ID;
int loop_extra(enum ha_extra_function operation);
int loop_extra_alter(enum ha_extra_function operations);
void late_extra_cache(uint partition_id);
diff --git a/storage/mroonga/lib/mrn_context_pool.cpp b/storage/mroonga/lib/mrn_context_pool.cpp
index d297ee9a338..a6000df29e3 100644
--- a/storage/mroonga/lib/mrn_context_pool.cpp
+++ b/storage/mroonga/lib/mrn_context_pool.cpp
@@ -50,7 +50,7 @@ namespace mrn {
if (pool_) {
ctx = static_cast<grn_ctx *>(pool_->data);
list_pop(pool_);
- if ((now - last_pull_time_) >= CLEAR_THREATHOLD_IN_SECONDS) {
+ if ((uint) (now - last_pull_time_) >= CLEAR_THREATHOLD_IN_SECONDS) {
clear();
}
}
diff --git a/strings/json_lib.c b/strings/json_lib.c
index 92967dfe400..625f6f8fff4 100644
--- a/strings/json_lib.c
+++ b/strings/json_lib.c
@@ -1386,7 +1386,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 ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
path_found= TRUE;
else
{
@@ -1419,7 +1419,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 ((uint) (cur_step - state->paths[p_c].last_step) == state->cur_depth)
path_found= TRUE;
else
{