Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 60ff5de

Browse files
committed
Suppress uninitialized-variable warning from less-bright compilers.
The type variable must get set on first iteration of the while loop, but there are reasonably modern gcc versions that don't realize that. Initialize it with a dummy value. This undoes a removal of initialization in commit 654809e.
1 parent ecfe1a1 commit 60ff5de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/jsonb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len)
372372
{
373373
bool first = true;
374374
JsonbIterator *it;
375-
JsonbIteratorToken type;
375+
JsonbIteratorToken type = WJB_DONE;
376376
JsonbValue v;
377377
int level = 0;
378378
bool redo_switch = false;

0 commit comments

Comments
 (0)