Re: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c
Date
Msg-id 1812498.1790279465@sss.pgh.pa.us
Whole thread
In response to Re: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c  (Nathan Bossart <nathandbossart@gmail.com>)
Responses Re: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c
List pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Thu, Jun 18, 2026 at 06:08:12PM +0200, Álvaro Herrera wrote:
>> I'd stop at 14 and call it a day.  It doesn't prevent building, which is
>> IIRC the criteria we use for the older branches.

> WFM.  Committed, thanks.

Since I updated 'mamba' to NetBSD 11 (which has gcc 12.5.0),
it's been spewing a closely related warning:

parse_func.c: In function 'LookupFuncWithArgs':
parse_func.c:2457:15: warning: 'argoids' may be used uninitialized [-Wmaybe-uninitialized]
 2457 |     oid = LookupFuncNameInternal(func->args_unspecified ? objtype : OBJECT_ROUTINE,
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2458 |                                  func->objname, nargs, argoids,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2459 |                                  false, missing_ok,
      |                                  ~~~~~~~~~~~~~~~~~~
 2460 |                                  &lookupError);
      |                                  ~~~~~~~~~~~~~
parse_func.c:2234:1: note: by argument 4 of type 'const Oid *' {aka 'const unsigned int *'} to 'LookupFuncNameInternal'
declaredhere 
 2234 | LookupFuncNameInternal(ObjectType objtype, List *funcname,
      | ^~~~~~~~~~~~~~~~~~~~~~
parse_func.c:2395:33: note: 'argoids' declared here
 2395 |     Oid             argoids[FUNC_MAX_ARGS];
      |                     ^~~~~~~

Presumably this could be silenced in the same way as in f04781df5.
I haven't troubled so far because I don't see any other BF animals
producing the same warning, but perhaps we should silence this one
too?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Bossart
Date:
Subject: Re: convert various variables to atomics
Next
From: Nathan Bossart
Date:
Subject: Re: AW: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c