Suppress uninitialized-variable warning from a61b1f748.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Dec 2022 23:07:48 +0000 (18:07 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Dec 2022 23:07:48 +0000 (18:07 -0500)
Some compilers complain about sub_rteperminfos not being
initialized, evidently because they don't detect that it
is only used and set if isGeneralSelect is true.
Make it follow the long-established pattern for its
sibling variable sub_rtable.

Per reports from Pavel Stehule and the buildfarm.

Discussion: https://postgr.es/m/CAFj8pRDOvGOi-n616kM0Cc7qSbg_nGoS=-haB+D785sUXADqSg@mail.gmail.com

src/backend/parser/analyze.c

index 2e593aed2bc999a9f70c6f13d55ac3080a8a524d..9bf2fa9a30fed005df85692ed6a50645bcd3a410 100644 (file)
@@ -615,6 +615,7 @@ transformInsertStmt(ParseState *pstate, InsertStmt *stmt)
    else
    {
        sub_rtable = NIL;       /* not used, but keep compiler quiet */
+       sub_rteperminfos = NIL;
        sub_namespace = NIL;
    }