summaryrefslogtreecommitdiff
path: root/sql/sql_priv.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-07-20 19:47:46 +0200
committerSergei Golubchik <serg@mariadb.org>2015-07-20 19:47:46 +0200
commit3d4c69d22485036425086e4835a42d7c21b74e07 (patch)
tree20bb5ffde7cc20e405d0231436c909e78f11a4b6 /sql/sql_priv.h
parent82c6b259a59a6c0932f4198fcbfad5865545de25 (diff)
downloadmariadb-git-3d4c69d22485036425086e4835a42d7c21b74e07.tar.gz
compiler warning
WARN_DEPRECATED_NO_REPLACEMENT(NULL, ...) was causing a warning, because it expanded into NULL->variables.errmsgs[...]
Diffstat (limited to 'sql/sql_priv.h')
-rw-r--r--sql/sql_priv.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_priv.h b/sql/sql_priv.h
index b09a6c84c83..4d62f72f571 100644
--- a/sql/sql_priv.h
+++ b/sql/sql_priv.h
@@ -77,11 +77,12 @@
#define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \
do { \
- if (((THD *) Thd) != NULL) \
- push_warning_printf(((THD *) Thd), Sql_condition::WARN_LEVEL_WARN, \
- ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \
- ER_THD(((THD *) Thd), ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \
- (Old)); \
+ THD *thd_= ((THD*) Thd); \
+ if (thd_ != NULL) \
+ push_warning_printf(thd_, Sql_condition::WARN_LEVEL_WARN, \
+ ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \
+ ER_THD(thd_, ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \
+ (Old)); \
else \
sql_print_warning("'%s' is deprecated and will be removed " \
"in a future release.", (Old)); \