Suppress uninitialized-variable warning.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Apr 2021 19:14:26 +0000 (15:14 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 8 Apr 2021 19:14:26 +0000 (15:14 -0400)
Several buildfarm critters that don't usually produce such
warnings are complaining about e717a9a18.  I think it's
actually safe, but move initialization to silence the warning.

src/backend/catalog/pg_proc.c

index 05de377ba9cf681cdb248b7e33d0d54ffe655cbd..cd13e63852a940bba1f213eab4bcdfc5c64ca38c 100644 (file)
@@ -916,6 +916,7 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
             * least catch silly syntactic errors.
             */
            raw_parsetree_list = pg_parse_query(prosrc);
+           querytree_list = NIL;
 
            if (!haspolyarg)
            {
@@ -928,7 +929,6 @@ fmgr_sql_validator(PG_FUNCTION_ARGS)
                /* But first, set up parameter information */
                pinfo = prepare_sql_fn_parse_info(tuple, NULL, InvalidOid);
 
-               querytree_list = NIL;
                foreach(lc, raw_parsetree_list)
                {
                    RawStmt    *parsetree = lfirst_node(RawStmt, lc);