Skip to content

Commit 70d6236

Browse files
sjaakolaNirbhay Choubey
authored andcommitted
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) || [
1 parent f6b1e0f commit 70d6236

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/sql_parse.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,11 @@ bool do_command(THD *thd)
693693
{
694694
bool return_value;
695695
char *packet= 0;
696+
#ifdef WITH_WSREP
697+
ulong packet_length= 0; // just to avoid (false positive) compiler warning
698+
#else
696699
ulong packet_length;
700+
#endif /* WITH_WSREP */
697701
NET *net= &thd->net;
698702
enum enum_server_command command;
699703
DBUG_ENTER("do_command");

0 commit comments

Comments
 (0)