pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: pgsql-committers@postgresql.org
Subject: pgsql: Silence uninitialized variable compiler warning in sepgsql
Date: Thu, 06 Apr 2017 21:28:42 +0000
Message-ID: <E1cwExO-0002BC-C2@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Message-ID: <E1cwExO-0002BC-C2@gemulon.postgresql.org>
Permalink:  ../E1cwExO-0002BC-C2@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1cwExO-0002BC-C2@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: mail@joeconway.com
  Subject: Re: pgsql: Silence uninitialized variable compiler warning in sepgsql
  In-Reply-To: <E1cwExO-0002BC-C2@gemulon.postgresql.org>
  References: <E1cwExO-0002BC-C2@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox