pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Hans Buschmann <buschmann@nidsa.net>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c
Date: Fri, 12 Jun 2026 16:54:04 +0200
Message-ID: <aiwb1wzWn-q1LNti@alvherre.pgsql> (raw)
In-Reply-To: <aiGUxEzo4o5_fRIq@nathan>

On 2026-Jun-04, Nathan Bossart wrote:

> On Thu, Jun 04, 2026 at 02:42:18PM +0000, Hans Buschmann wrote:
> > 839/2360] Compiling C object src/backend/postgres_lib.a.p/optimizer_util_clauses.c.o
> > ../src/backend/optimizer/util/clauses.c: In function ‘recheck_cast_function_args.isra’:
> > ../src/backend/optimizer/util/clauses.c:5152:19: warning: ‘actual_arg_types’ may be used uninitialized [-Wmaybe-uninitialized]
> >  5152 |         rettype = enforce_generic_type_consistency(actual_arg_types,
> 
> This code is ~18 years old, so I'm dubious there's a real problem here.
> Does something like this suppress the warning?
> 
> 	Oid			actual_arg_types[FUNC_MAX_ARGS] = {InvalidOid};

I agree that it doesn't look like there's a real problem, and that
something like what you suggest should silence this warning.  I mildly
prefer to do " = {0}" though, the rules for C incomplete initializers
being so weird.  But I wouldn't oppose this patch as posted.

BTW we seem to do pretty much the same thing in ParseFuncOrColumn(),
right?

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"People get annoyed when you try to debug them."  (Larry Wall)





view thread (5+ messages)  latest in thread

Message-ID: <aiwb1wzWn-q1LNti@alvherre.pgsql>
Permalink:  ../aiwb1wzWn-q1LNti@alvherre.pgsql/
Also on:    postgresql.org/message-id/aiwb1wzWn-q1LNti@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@kurilemu.de, nathandbossart@gmail.com, buschmann@nidsa.net
  Subject: Re: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c
  In-Reply-To: <aiwb1wzWn-q1LNti@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox