Commit 3d4c69d2 authored by Sergei Golubchik's avatar Sergei Golubchik

compiler warning

WARN_DEPRECATED_NO_REPLACEMENT(NULL, ...) was causing a warning,
because it expanded into NULL->variables.errmsgs[...]
parent 82c6b259
...@@ -77,11 +77,12 @@ ...@@ -77,11 +77,12 @@
#define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \ #define WARN_DEPRECATED_NO_REPLACEMENT(Thd,Old) \
do { \ do { \
if (((THD *) Thd) != NULL) \ THD *thd_= ((THD*) Thd); \
push_warning_printf(((THD *) Thd), Sql_condition::WARN_LEVEL_WARN, \ if (thd_ != NULL) \
ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \ push_warning_printf(thd_, Sql_condition::WARN_LEVEL_WARN, \
ER_THD(((THD *) Thd), ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \ ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT, \
(Old)); \ ER_THD(thd_, ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT), \
(Old)); \
else \ else \
sql_print_warning("'%s' is deprecated and will be removed " \ sql_print_warning("'%s' is deprecated and will be removed " \
"in a future release.", (Old)); \ "in a future release.", (Old)); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment