diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-27 18:19:22 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-02-28 10:46:10 -0500 |
commit | 60ff5de22aa4781f60cc141e2518c242c66d9235 (patch) | |
tree | 039488e0db91ba5f87f05a8c833aa62de3d5a52a /src/backend/utils/adt/jsonb.c | |
parent | ecfe1a1889bc8640a4e3b8659d69ec1fd0e30b4a (diff) |
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 654809e770ce270c0bb9de726c5df1ab193d60f0.
Diffstat (limited to 'src/backend/utils/adt/jsonb.c')
-rw-r--r-- | src/backend/utils/adt/jsonb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/jsonb.c b/src/backend/utils/adt/jsonb.c index 0a36c44e9b4..1d65b251895 100644 --- a/src/backend/utils/adt/jsonb.c +++ b/src/backend/utils/adt/jsonb.c @@ -372,7 +372,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; |