summaryrefslogtreecommitdiffstats
path: root/src/parser_json.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-06-19 22:43:01 +0200
committerFlorian Westphal <fw@strlen.de>2023-06-20 21:44:49 +0200
commite5bf0485ff1ba0f2ff2fb3b03cfed1f98953dc1b (patch)
treef10693ac3e45ee74e0049994c455d20057210baf /src/parser_json.c
parentc827a833971c14e7478ec101f998136a8cdd7bf2 (diff)
json: dccp: remove erroneous const qualifier
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@strlen.de>
Diffstat (limited to 'src/parser_json.c')
-rw-r--r--src/parser_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_json.c b/src/parser_json.c
index 91b37b58..55c6b8c7 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -807,7 +807,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;