build gcc warning - Mailing list pgsql-hackers

From Pavel Stehule
Subject build gcc warning
Date
Msg-id CAFj8pRDOvGOi-n616kM0Cc7qSbg_nGoS=-haB+D785sUXADqSg@mail.gmail.com
Whole thread Raw
Responses Re: build gcc warning  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi

I got new warning

 -o session.bc session.c
analyze.c: In function ‘transformStmt’:
analyze.c:550:21: warning: ‘sub_rteperminfos’ may be used uninitialized [-Wmaybe-uninitialized]
  550 |         List       *sub_rteperminfos;
      |                     ^~~~~~~~~~~~~~~~

<-->if (isGeneralSelect)
<-->{
<--><-->sub_rtable = pstate->p_rtable;
<--><-->pstate->p_rtable = NIL;
<--><-->sub_rteperminfos = pstate->p_rteperminfos;
<--><-->pstate->p_rteperminfos = NIL;
<--><-->sub_namespace = pstate->p_namespace;
<--><-->pstate->p_namespace = NIL;
<-->}
<-->else
<-->{
<--><-->sub_rtable = NIL;<-><-->/* not used, but keep compiler quiet */
<--><-->sub_namespace = NIL;
           --- missing sub_rteperminfos
<-->}

Regards

Pavel

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [BUG] pg_upgrade test fails from older versions.
Next
From: Masahiko Sawada
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply