diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-07-20 19:47:46 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-07-20 19:47:46 +0200 |
commit | 3d4c69d22485036425086e4835a42d7c21b74e07 (patch) | |
tree | 20bb5ffde7cc20e405d0231436c909e78f11a4b6 /sql/sql_priv.h | |
parent | 82c6b259a59a6c0932f4198fcbfad5865545de25 (diff) | |
download | mariadb-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.h | 11 |
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)); \ |