Skip to content

Commit

Permalink
resolve cstrict warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Nov 18, 2024
1 parent 87e3552 commit c707f7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vlib/v/gen/c/json.v
Original file line number Diff line number Diff line change
Expand Up @@ -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}};
}
}
')
Expand Down

0 comments on commit c707f7e

Please sign in to comment.