From d2b115616f36287caa2e9d59b54c8b090613b6a9 Mon Sep 17 00:00:00 2001 From: Jessie Murray Date: Tue, 13 Apr 2021 17:34:10 -0700 Subject: [PATCH] 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. --- src/jansson/src/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jansson/src/dump.c b/src/jansson/src/dump.c index a75dc65..fb6d545 100644 --- a/src/jansson/src/dump.c +++ b/src/jansson/src/dump.c @@ -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) { const char *pos, *end; - int32_t codepoint; + int32_t codepoint = 0; if(dump("\"", 1, data)) return -1;