Skip to content

Commit c3e60f3

Browse files
committed
Silence some compiler warnings in commit 3311ea8
Per report from Nathan Bossart
1 parent 55a5ee3 commit c3e60f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/common/jsonapi.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ IsValidJsonNumber(const char *str, int len)
279279
return false;
280280

281281
dummy_lex.incremental = false;
282+
dummy_lex.inc_state = NULL;
283+
dummy_lex.pstack = NULL;
282284

283285
/*
284286
* json_lex_number expects a leading '-' to have been eaten already.
@@ -297,6 +299,8 @@ IsValidJsonNumber(const char *str, int len)
297299
dummy_lex.input_length = len;
298300
}
299301

302+
dummy_lex.token_start = dummy_lex.input;
303+
300304
json_lex_number(&dummy_lex, dummy_lex.input, &numeric_error, &total_len);
301305

302306
return (!numeric_error) && (total_len == dummy_lex.input_length);
@@ -2018,6 +2022,9 @@ json_lex_number(JsonLexContext *lex, char *s,
20182022
{
20192023
appendBinaryStringInfo(&lex->inc_state->partial_token,
20202024
lex->token_start, s - lex->token_start);
2025+
if (num_err != NULL)
2026+
*num_err = error;
2027+
20212028
return JSON_INCOMPLETE;
20222029
}
20232030
else if (num_err != NULL)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy