Skip to content

Commit 1b00fe3

Browse files
committed
Fix warnings re typedef redefinition in ea7b4e9 and 3311ea8
Per gripe from Tom Lane and the buildfarm
1 parent 6f4d63e commit 1b00fe3

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/common/jsonapi.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ typedef enum
7878
* struct containing the 3 stacks used in non-recursive parsing,
7979
* and the token and value for scalars that need to be preserved
8080
* across calls.
81+
*
82+
* typedef appears in jsonapi.h
8183
*/
82-
typedef struct JsonParserStack
84+
struct JsonParserStack
8385
{
8486
int stack_size;
8587
char *prediction;
@@ -89,18 +91,20 @@ typedef struct JsonParserStack
8991
bool *fnull;
9092
JsonTokenType scalar_tok;
9193
char *scalar_val;
92-
} JsonParserStack;
94+
};
9395

9496
/*
9597
* struct containing state used when there is a possible partial token at the
9698
* end of a json chunk when we are doing incremental parsing.
99+
*
100+
* typedef appears in jsonapi.h
97101
*/
98-
typedef struct JsonIncrementalState
102+
struct JsonIncrementalState
99103
{
100104
bool is_last_chunk;
101105
bool partial_completed;
102106
StringInfoData partial_token;
103-
} JsonIncrementalState;
107+
};
104108

105109
/*
106110
* constants and macros used in the nonrecursive parser

src/common/parse_manifest.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,13 @@ typedef struct
9191
char *manifest_checksum;
9292
} JsonManifestParseState;
9393

94-
typedef struct JsonManifestParseIncrementalState
94+
/* typedef appears in parse_manifest.h */
95+
struct JsonManifestParseIncrementalState
9596
{
9697
JsonLexContext lex;
9798
JsonSemAction sem;
9899
pg_cryptohash_ctx *manifest_ctx;
99-
} JsonManifestParseIncrementalState;
100+
};
100101

101102
static JsonParseErrorType json_manifest_object_start(void *state);
102103
static JsonParseErrorType json_manifest_object_end(void *state);

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