Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
Description
Compiler complains like this:
/mariadb/10.2/sql/item_jsonfunc.cc:878:7: warning: variable 'i' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (read_json(NULL, &type, &value, &value_len) != NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mariadb/10.2/sql/item_jsonfunc.cc:898:10: note: uninitialized use occurs here
return i;
^
/mariadb/10.2/sql/item_jsonfunc.cc:878:3: note: remove the 'if' if its condition
is always true
if (read_json(NULL, &type, &value, &value_len) != NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mariadb/10.2/sql/item_jsonfunc.cc:876:13: note: initialize the variable 'i' to
silence this warning
longlong i;
^
= 0