]> granicus.if.org Git - postgresql/commit
Silence assorted "variable may be used uninitialized" warnings.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2018 21:06:49 +0000 (16:06 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Feb 2018 21:06:49 +0000 (16:06 -0500)
commit9a725f7b5cb7e8c8894ef121b49eff9c265245c8
tree37e438b1542f8c1e1f57d78fa5cee47cd35357ce
parent0c62356cc8777961221a643fa77f62e1c7361085
Silence assorted "variable may be used uninitialized" warnings.

All of these are false positives, but in each case a fair amount of
analysis is needed to see that, and it's not too surprising that not all
compilers are smart enough.  (In particular, in the logtape.c case, a
compiler lacking the knowledge provided by the Assert would almost surely
complain, so that this warning will be seen in any non-assert build.)

Some of these are of long standing while others are pretty recent,
but it only seems worth fixing them in HEAD.

Jaime Casanova, tweaked a bit by me

Discussion: https://postgr.es/m/CAJGNTeMcYAMJdPAom52dppLMtF-UnEZi0dooj==75OEv1EoBZA@mail.gmail.com
src/backend/access/transam/xloginsert.c
src/backend/catalog/objectaddress.c
src/backend/utils/sort/logtape.c
src/bin/pgbench/pgbench.c