From 70d6236afd55b74211fee507c5af6b2b631c3f26 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Feb 2015 00:47:02 +0200 Subject: [PATCH] refs codership/mysql-wsrep#55 - To avoid compiler warming: sql/sql_parse.cc: In function 'bool do_command(THD*)': sql/sql_parse.cc:758:20: error: 'packet_length' may be used uninitialized in this function [-Werror=maybe-uninitialized] if ((WSREP(thd) && packet_length == packet_error) || [ --- sql/sql_parse.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 991f960b2c4..c931a02661e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -693,7 +693,11 @@ bool do_command(THD *thd) { bool return_value; char *packet= 0; +#ifdef WITH_WSREP + ulong packet_length= 0; // just to avoid (false positive) compiler warning +#else ulong packet_length; +#endif /* WITH_WSREP */ NET *net= &thd->net; enum enum_server_command command; DBUG_ENTER("do_command");