This causes a clang warning: parser_json.c:767:6: warning: variable 'opt_type' is uninitialized when used here [-Wuninitialized] if (opt_type < DCCPOPT_TYPE_MIN || opt_type > DCCPOPT_TYPE_MAX) { ^~~~~~~~ ... because it deduces the object is readonly. Signed-off-by: Florian Westphal <fw@xxxxxxxxx> --- src/parser_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser_json.c b/src/parser_json.c index f1cc39505382..c1e15ee186f5 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -759,7 +759,7 @@ static struct expr *json_parse_sctp_chunk_expr(struct json_ctx *ctx, static struct expr *json_parse_dccp_option_expr(struct json_ctx *ctx, const char *type, json_t *root) { - const int opt_type; + int opt_type; if (json_unpack_err(ctx, root, "{s:i}", "type", &opt_type)) return NULL; -- 2.39.3