Skip to content

Commit

Permalink
compiler warning
Browse files Browse the repository at this point in the history
WARN_DEPRECATED_NO_REPLACEMENT(NULL, ...) was causing a warning,
because it expanded into NULL->variables.errmsgs[...]
  • Loading branch information
vuvova committed Jul 20, 2015
1 parent 82c6b25 commit 3d4c69d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions sql/sql_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)); \
Expand Down

0 comments on commit 3d4c69d

Please sign in to comment.