build gcc warning

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: build gcc warning
Date: 2022-12-27 05:55:30
Message-ID: CAFj8pRDOvGOi-n616kM0Cc7qSbg_nGoS=-haB+D785sUXADqSg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2022-12-27 05:57:55 Re: Perform streaming logical transactions by background workers and parallel apply
Previous Message Michael Paquier 2022-12-27 05:44:38 Re: [BUG] pg_upgrade test fails from older versions.