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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Suppress "variable may be used uninitialized" warning.
Date: 2015-07-29 00:54:18
Message-ID: 8117.1438131258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Joe Conway <mail(at)joeconway(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Joe Conway 2015-07-29 01:13:39 Re: pgsql: Suppress "variable may be used uninitialized" warning.
Previous Message Peter Eisentraut 2015-07-29 00:34:10 pgsql: pg_basebackup: Add --slot option