pgsql: Suppress uninitialized-variable warning from less-bright compile

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Suppress uninitialized-variable warning from less-bright compile
Date: 2015-02-27 23:19:27
Message-ID: E1YRUBr-0005rT-7M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/d61f1a93271b859938b6cdb301a367cdb8abf81c

Modified Files
--------------
src/backend/utils/adt/jsonb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2015-02-27 23:44:55 Re: pgsql: Invent a memory context reset/delete callback mechanism.
Previous Message Tom Lane 2015-02-27 23:10:13 pgsql: Redefine MemoryContextReset() as deleting, not resetting, child