Thread: pgsql: Suppress "variable may be used uninitialized" warning.

pgsql: Suppress "variable may be used uninitialized" warning.

From
Tom Lane
Date:
Suppress "variable may be used uninitialized" warning.

Also re-pgindent, just because I'm a neatnik.

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/commands/policy.c |    8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)


Re: pgsql: Suppress "variable may be used uninitialized" warning.

From
Joe Conway
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/28/2015 04:56 PM, Tom Lane wrote:
> Suppress "variable may be used uninitialized" warning.

That's odd -- I compiled both with and without debug options looking
for warnings and saw none.


- --
Joe Conway
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVuBpnAAoJEDfy90M199hl/EIQAJFjQcBHQ3vNld/x2nszq76X
TBxanOEwHtaYH4/jkrg7T24W8JjOdB8TrOidxbXVEdFFd1NKut5zx70KjeZiguUf
BwLaorv9I+RVcEx35aOC5EQ4+dxWmbBg/x1FGQXvXqqZmGLQj4hYGTKqTP9jcI0/
Jwg3FSfnBANzlvLo07XIicFL3E2NkaCKNOYF3nXYYxkKeqA6EgjbxgGS9UD56M2b
28s1GCEEHHSPtiwouhE+lO1ChQl8R+JuKq3mRL2wbhYlhUQhGZwoZ5p6ib6ELPH0
R688DsAw6mNFBaa0qRuIYDtTWW/ujSfqHCoGMCPW3SlWGxcyeTuPv5K325itu0x1
07If/zUpVZJ4BFS1cT4aBEWYy/mcCSaCRi7yB9Mkc15hjo8i6w70/z7YnBUqGv6o
8WpJKAEcHzFNwl4zcyKBomJf1oK1TjH5CwSMEbyw+qRGhu7xTlglM86b1wdmgdEx
0520YRQcCF9IzR2BW8aPcKAzlakbcuOfp0k2xQszZnT3zh3RUy43tS1gi+cmbH4z
AB0lM+VnISoQMMEFeLLjf7fXqsgPnZn2h7zamUQvuNf2Fe/UQWxWzGEt1GO6iZgh
74w9R63zdcHQmNMeSXLanrIWSvLrlmVvUVsk0dpWNPxSMB2cbDPLtIACBaXRD7BN
jEXe0alvazCmJMkrKFm8
=KFcx
-----END PGP SIGNATURE-----


Re: pgsql: Suppress "variable may be used uninitialized" warning.

From
Tom Lane
Date:
Joe Conway <mail@joeconway.com> writes:
>> Suppress "variable may be used uninitialized" warning.

> That's odd -- I compiled both with and without debug options looking
> for warnings and saw none.

That warning is very compiler-dependent; smarter compilers can prove
that an uninitialized usage is unreachable while dumber ones can't.
I saw it on RHEL6's gcc 4.4.7.  I figure that suppressing warnings
on any reasonably popular/modern compiler is fair game.

            regards, tom lane


Re: pgsql: Suppress "variable may be used uninitialized" warning.

From
Joe Conway
Date:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/28/2015 05:54 PM, Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>>> Suppress "variable may be used uninitialized" warning.
>
>> That's odd -- I compiled both with and without debug options
>> looking for warnings and saw none.
>
> That warning is very compiler-dependent; smarter compilers can
> prove that an uninitialized usage is unreachable while dumber ones
> can't. I saw it on RHEL6's gcc 4.4.7.  I figure that suppressing
> warnings on any reasonably popular/modern compiler is fair game.

Ah, ok. I just felt bad that I didn't find it myself.


- --
Joe Conway
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJVuCjDAAoJEDfy90M199hl+qwP/ipvor/74wQpxdHCge2pepDJ
ZS/sflIP+4VpALaMGGX9MkAo7ZeFMsZ3Yu2VfW7+0wlPUvWt/dydEZZKU5e9ujAR
zEVmAfWwYimeUsWs/6i6R/P6jKkT0JnThIMgLXEJIEr/xCqiUjyCy5X1wTVaRAvd
USMPpHra4mc3X1KQrT3AMwHj3ZZA1ygul5unarQ5PoZWPwPPkHX7Hg/5q99fYynO
U7XBL5+O1HWDoGsXVPIK4oqB1L+kt7QyPyalIHf/lYO/iS+KsbIZvYLcn9JbddWK
mei56EOxRgqhwalI6HccoHHx0arjUgC3D9OFtDWkAaHsL7qMpdjhxU9Sp0E7S7Vj
IjrdE61zREw9R7fZeT4I54SKqok2VJCu1739ntnzc2tw1z+jTj/LD57sc2IbxjSI
zI5Rj1FgP3zcc73gq2eu8HzeMRkCig0AvdjI3llGTVIy4x4WDx5GncLLhCiaJ8OP
vMkNpZtHOzJuvrBNfDkZ7inO3E54uyPTt++ON5TX0YVUrG4cQnOds1g85R1QUTBj
E6YRIpeMBWqi0ErtTGN4R2BdepV/tMxVA4p9a2wIFOxxV83bIDlZsILKyVtMsZBV
SEDMbKDoT8t8/6YZ22eKmF5nORTXCY14vCOltaDQ9RnHRBYLv8dMZg9BqHnDDGeg
sRTSPf+j4r7wGOtCJEsx
=krPc
-----END PGP SIGNATURE-----