Commit e33d452b authored by Marko Mäkelä's avatar Marko Mäkelä

Fix bogus -Wmaybe-uninitialized in GCC 10.2.0 -Og

If and only if read_variable_length() returns true, the variable
blob_length will be uninitialized and not used. For some reason,
GCC 10.2.0 -Og debug builds would issue a warning.
parent f6549e95
...@@ -285,7 +285,7 @@ static bool parse_mysql_scalar(String *buffer, size_t value_json_type, ...@@ -285,7 +285,7 @@ static bool parse_mysql_scalar(String *buffer, size_t value_json_type,
const uchar type_value= *data; const uchar type_value= *data;
const enum_field_types field_type= static_cast<enum_field_types>(type_value); const enum_field_types field_type= static_cast<enum_field_types>(type_value);
size_t blob_length, length_bytes; size_t UNINIT_VAR(blob_length), length_bytes;
const uchar *blob_start; const uchar *blob_start;
if (read_variable_length(data + 1, len, &blob_length, &length_bytes) || if (read_variable_length(data + 1, len, &blob_length, &length_bytes) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment