Skip to content

Commit b5689c6

Browse files
author
Alexey Botchkov
committed
Compiler warnings fixed.
1 parent 58e0dcb commit b5689c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sql/item_jsonfunc.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,6 +1352,8 @@ longlong Item_func_json_contains_path::val_int()
13521352
bzero(p_found, (arg_count-2) * sizeof(bool));
13531353
n_found= arg_count - 2;
13541354
}
1355+
else
1356+
n_found= 0; /* Jost to prevent 'uninitialized value' warnings */
13551357

13561358
result= 0;
13571359
while (json_get_path_next(&je, &p) == 0)
@@ -2058,7 +2060,7 @@ String *Item_func_json_merge::val_str(String *str)
20582060
{
20592061
DBUG_ASSERT(fixed == 1);
20602062
json_engine_t je1, je2;
2061-
String *js1= args[0]->val_json(&tmp_js1), *js2;
2063+
String *js1= args[0]->val_json(&tmp_js1), *js2=NULL;
20622064
uint n_arg;
20632065

20642066
if (args[0]->null_value)

0 commit comments

Comments
 (0)