CodeQL: Potentially uninitialized local variable

This is not really uninitialized, it would only happen if the string
dumped with dump_string was empty of contained invalid UTF-8. Setting
an initial value has no effect since codepoint is used as an "out"
value in utf8_iterate.
master
Jessie Murray 3 years ago committed by Nicolas Favre-Felix
parent b1b300f508
commit d2b115616f
No known key found for this signature in database
GPG Key ID: C04E7AA8B6F73372

@ -69,7 +69,7 @@ static int dump_indent(size_t flags, int depth, int space, dump_func dump, void
static int dump_string(const char *str, int ascii, dump_func dump, void *data) static int dump_string(const char *str, int ascii, dump_func dump, void *data)
{ {
const char *pos, *end; const char *pos, *end;
int32_t codepoint; int32_t codepoint = 0;
if(dump("\"", 1, data)) if(dump("\"", 1, data))
return -1; return -1;

Loading…
Cancel
Save