Skip to content

Commit d61f1a9

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 eaa5808 commit d61f1a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/jsonb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len)
424424
{
425425
bool first = true;
426426
JsonbIterator *it;
427-
JsonbIteratorToken type;
427+
JsonbIteratorToken type = WJB_DONE;
428428
JsonbValue v;
429429
int level = 0;
430430
bool redo_switch = false;

0 commit comments

Comments
 (0)