git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55a5ee3)
Silence some compiler warnings in commit 3311ea86ed
Fri, 5 Apr 2024 20:07:52 +0000 (16:07 -0400)
Fri, 5 Apr 2024 20:08:40 +0000 (16:08 -0400)
Per report from Nathan Bossart


diff --git a/src/common/jsonapi.c b/src/common/jsonapi.c
index 5f947dd6182892bb7f6b26b08c6cf29592c6485d..44dbb7f7f960c9d84fa1ef67910f11818c1586bb 100644 (file)
--- a/src/common/jsonapi.c
+++ b/src/common/jsonapi.c
@@ -279,6 +279,8 @@ IsValidJsonNumber(const char *str, int len)
return false;
dummy_lex.incremental = false;
+ dummy_lex.inc_state = NULL;
+ dummy_lex.pstack = NULL;
/*
* json_lex_number expects a leading '-' to have been eaten already.
@@ -297,6 +299,8 @@ IsValidJsonNumber(const char *str, int len)
dummy_lex.input_length = len;
}
+ dummy_lex.token_start = dummy_lex.input;
+
json_lex_number(&dummy_lex, dummy_lex.input, &numeric_error, &total_len);
return (!numeric_error) && (total_len == dummy_lex.input_length);
@@ -2018,6 +2022,9 @@ json_lex_number(JsonLexContext *lex, char *s,
{
appendBinaryStringInfo(&lex->inc_state->partial_token,
lex->token_start, s - lex->token_start);
+ if (num_err != NULL)
+ *num_err = error;
+
return JSON_INCOMPLETE;
}
else if (num_err != NULL)
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /