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 654809e770.
pull/14/head
Tom Lane 11 years ago
parent eaa5808e8e
commit d61f1a9327
  1. 2
      src/backend/utils/adt/jsonb.c

@ -424,7 +424,7 @@ JsonbToCString(StringInfo out, JsonbContainer *in, int estimated_len)
{
bool first = true;
JsonbIterator *it;
JsonbIteratorToken type;
JsonbIteratorToken type = WJB_DONE;
JsonbValue v;
int level = 0;
bool redo_switch = false;

Loading…
Cancel
Save