]> granicus.if.org Git - postgresql/commit
Silence uninitialized variable compiler warning in sepgsql
authorJoe Conway <mail@joeconway.com>
Thu, 6 Apr 2017 21:28:19 +0000 (14:28 -0700)
committerJoe Conway <mail@joeconway.com>
Thu, 6 Apr 2017 21:28:19 +0000 (14:28 -0700)
commitaf8a94d18d70ca226a12057ad4b3d17f27d8ff13
tree9ca5d80e5a827d328b12e33ede019068517f9ff3
parentbd190eae36191a6795c4f0fe95419dbf2953d2b0
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
contrib/sepgsql/relation.c