Skip to content
Permalink
Browse files
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.
  • Loading branch information
dr-m committed Oct 29, 2020
1 parent f6549e9 commit e33d452
Showing 1 changed file with 1 addition and 1 deletion.
@@ -285,7 +285,7 @@ static bool parse_mysql_scalar(String *buffer, size_t value_json_type,
const uchar type_value= *data;
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;

if (read_variable_length(data + 1, len, &blob_length, &length_bytes) ||

0 comments on commit e33d452

Please sign in to comment.