Re: GCC warning in back branches

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: GCC warning in back branches
Date: 2021-02-15 01:34:58
Message-ID: YCnPwuJb3dfNJTPt@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 15, 2021 at 02:15:51PM +1300, Thomas Munro wrote:
> guc.c: In function ‘RestoreGUCState’:
> guc.c:9455:4: error: ‘varsourceline’ may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
> 9455 | set_config_sourcefile(varname, varsourcefile, varsourceline);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> I propose the attached.

We usually don't bother much about compilation warnings in stable
branches as long as they are not real bugs, and these are the oldest
stable ones. So why here? I would have patched the top of the
function if it were me, btw.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-02-15 01:41:25 Re: GCC warning in back branches
Previous Message Thomas Munro 2021-02-15 01:33:00 Re: shared tempfile was not removed on statement_timeout