Re: pgsql: Suppress "variable may be used uninitialized" warning. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Suppress "variable may be used uninitialized" warning.
Date
Msg-id 8117.1438131258@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Suppress "variable may be used uninitialized" warning.  (Joe Conway <mail@joeconway.com>)
Responses Re: pgsql: Suppress "variable may be used uninitialized" warning.
List pgsql-committers
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


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: pg_basebackup: Add --slot option
Next
From: Joe Conway
Date:
Subject: Re: pgsql: Suppress "variable may be used uninitialized" warning.