Commit 705ae384 authored by Davi Arnaut's avatar Davi Arnaut

Bug#45288: pb2 returns a lot of compilation warnings on linux

Fix compiler warnings.

mysys/stacktrace.c:
  Tag unused parameters.
sql/sql_lex.cc:
  Variable becomes unused in non-debug builds. Also, no need to
  assert the obvious.
parent 374a6fd2
...@@ -86,7 +86,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)), ...@@ -86,7 +86,9 @@ void my_print_stacktrace(uchar* stack_bottom __attribute__((unused)),
#if BACKTRACE_DEMANGLE #if BACKTRACE_DEMANGLE
char __attribute__ ((weak)) *my_demangle(const char *mangled_name, int *status) char __attribute__ ((weak)) *
my_demangle(const char *mangled_name __attribute__((unused)),
int *status __attribute__((unused)))
{ {
return NULL; return NULL;
} }
......
...@@ -1303,8 +1303,6 @@ int MYSQLlex(void *arg, void *yythd) ...@@ -1303,8 +1303,6 @@ int MYSQLlex(void *arg, void *yythd)
} }
else else
{ {
const char* version_mark= lip->get_ptr() - 1;
DBUG_ASSERT(*version_mark == '!');
/* /*
Patch and skip the conditional comment to avoid it Patch and skip the conditional comment to avoid it
being propagated infinitely (eg. to a slave). being propagated infinitely (eg. to a slave).
...@@ -1313,7 +1311,6 @@ int MYSQLlex(void *arg, void *yythd) ...@@ -1313,7 +1311,6 @@ int MYSQLlex(void *arg, void *yythd)
comment_closed= ! consume_comment(lip, 1); comment_closed= ! consume_comment(lip, 1);
if (! comment_closed) if (! comment_closed)
{ {
DBUG_ASSERT(pcom == version_mark);
*pcom= '!'; *pcom= '!';
} }
/* version allowed to have one level of comment inside. */ /* version allowed to have one level of comment inside. */
......
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