summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorJan Lindström <jan.lindstrom@mariadb.com>2017-04-05 14:35:41 +0300
committerJan Lindström <jan.lindstrom@mariadb.com>2017-04-05 14:35:41 +0300
commit09b28b3d10af1dfca7d9f97d7a11a44873a61e4e (patch)
treeb862ead075194be01517a0efa11e9d3bf7a6ea5d /sql
parent4b1cf0bba6b0aeb3bff7bf1edcfa17d539534325 (diff)
downloadmariadb-git-09b28b3d10af1dfca7d9f97d7a11a44873a61e4e.tar.gz
Fix compiler warnings on gcc 6.x.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/wsrep_mysqld.h2
-rw-r--r--sql/wsrep_sst.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 57c228900fe..a8db8463e8e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2177,7 +2177,7 @@ bool THD::notify_shared_lock(MDL_context_owner *ctx_in_use,
#ifdef WITH_WSREP
{
signalled|= mysql_lock_abort_for_thread(this, thd_table);
- if (this && WSREP(this) && wsrep_thd_is_BF((void *)this, FALSE))
+ if (WSREP(this) && wsrep_thd_is_BF((void *)this, FALSE))
{
WSREP_DEBUG("remove_table_from_cache: %llu",
(unsigned long long) this->real_id);
diff --git a/sql/wsrep_mysqld.h b/sql/wsrep_mysqld.h
index 5ec183f7186..7f574cb996a 100644
--- a/sql/wsrep_mysqld.h
+++ b/sql/wsrep_mysqld.h
@@ -207,7 +207,7 @@ extern wsrep_seqno_t wsrep_locked_seqno;
strcmp(wsrep_provider, WSREP_NONE))
#define WSREP(thd) \
- (WSREP_ON && wsrep && (thd && thd->variables.wsrep_on))
+ (WSREP_ON && wsrep && (thd->variables.wsrep_on))
#define WSREP_CLIENT(thd) \
(WSREP(thd) && thd->wsrep_client_thread)
diff --git a/sql/wsrep_sst.cc b/sql/wsrep_sst.cc
index 877a93eec44..11698089582 100644
--- a/sql/wsrep_sst.cc
+++ b/sql/wsrep_sst.cc
@@ -814,7 +814,7 @@ static int sst_donate_mysqldump (const char* addr,
"%s",
host, port, mysqld_port, mysqld_unix_port,
wsrep_defaults_file, uuid_str,
- (long long)seqno, bypass ? " "WSREP_SST_OPT_BYPASS : "");
+ (long long)seqno, bypass ? " " WSREP_SST_OPT_BYPASS : "");
if (ret < 0 || ret >= cmd_len)
{
@@ -1125,7 +1125,7 @@ static int sst_donate_other (const char* method,
wsrep_defaults_file, wsrep_defaults_group_suffix,
binlog_opt, binlog_opt_val,
uuid, (long long) seqno,
- bypass ? " "WSREP_SST_OPT_BYPASS : "");
+ bypass ? " " WSREP_SST_OPT_BYPASS : "");
my_free(binlog_opt_val);
if (ret < 0 || ret >= cmd_len)