pgsql: Silence uninitialized variable compiler warning in sepgsql

From: Joe Conway <mail(at)joeconway(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Silence uninitialized variable compiler warning in sepgsql
Date: 2017-04-06 21:28:42
Message-ID: E1cwExO-0002BC-C2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Silence uninitialized variable compiler warning in sepgsql

At -Og optimization gcc warns that variable tclass may be used
uninitialized when relkind == RELKIND_INDEX. Actually that can't
happen due to an early return, but quiet the compiler by initializing
tclass to 0.

In passing, use uint16_t consistently for the declaration of tclass.

Complaint and initial patch by Mike Palmiotto. Editorializing by me.
Probably not worth backpatching given that it is cosmetic, so apply
to development head only.

Discussion: https://postgr.es/m/flat/623bcaae-112e-ced0-8c22-a84f75ae0c53%40joeconway.com

Branch
------
master

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

Modified Files
--------------
contrib/sepgsql/relation.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2017-04-06 21:41:24 Re: [COMMITTERS] pgsql: Collect and use multi-column dependency stats
Previous Message Joe Conway 2017-04-06 21:25:57 pgsql: Silence compiler warning in sepgsql