From c707f7e037c9790c5684b77206b81db017c95f36 Mon Sep 17 00:00:00 2001 From: Turiiya Date: Mon, 18 Nov 2024 05:54:41 +0100 Subject: [PATCH] resolve cstrict warning --- vlib/v/gen/c/json.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/v/gen/c/json.v b/vlib/v/gen/c/json.v index 450ee7e40b45fc..d01cf361aa4e97 100644 --- a/vlib/v/gen/c/json.v +++ b/vlib/v/gen/c/json.v @@ -119,9 +119,9 @@ ${dec_fn_dec} { int maxchars = vstrlen_char(prevline_ptr); vmemcpy(buf, prevline_ptr, (maxchars < maxcontext_chars ? maxchars : maxcontext_chars)); } - const char *colon; - colon = (buf[0] == \'\\0\') ? "" : ": "; - return (${result_name}_${ret_styp}){.is_error = true,.err = _v_error(string_plus_two(_SLIT("failed to decode JSON string"), tos2(colon), tos2(buf))),.data = {0}}; + string colon; + colon = (buf[0] == \'\\0\') ? _SLIT("") : _SLIT(": "); + return (${result_name}_${ret_styp}){.is_error = true,.err = _v_error(string_plus_two(_SLIT("failed to decode JSON string"), colon, tos2(buf))),.data = {0}}; } } ')