From b5689c6c872dc73d55c8150bcdc221fd04647a04 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Mon, 30 Oct 2017 14:59:43 +0400 Subject: Compiler warnings fixed. --- sql/item_jsonfunc.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql/item_jsonfunc.cc') diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc index f7be5b68892..9493d75018d 100644 --- a/sql/item_jsonfunc.cc +++ b/sql/item_jsonfunc.cc @@ -1352,6 +1352,8 @@ longlong Item_func_json_contains_path::val_int() bzero(p_found, (arg_count-2) * sizeof(bool)); n_found= arg_count - 2; } + else + n_found= 0; /* Jost to prevent 'uninitialized value' warnings */ result= 0; while (json_get_path_next(&je, &p) == 0) @@ -2058,7 +2060,7 @@ String *Item_func_json_merge::val_str(String *str) { DBUG_ASSERT(fixed == 1); json_engine_t je1, je2; - String *js1= args[0]->val_json(&tmp_js1), *js2; + String *js1= args[0]->val_json(&tmp_js1), *js2=NULL; uint n_arg; if (args[0]->null_value) -- cgit v1.2.1