Re: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Hans Buschmann <buschmann(at)nidsa(dot)net>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PG19beta1: GCC 16.1.1 warning: ‘actual_arg_types’ may be used uninitialized in clauses.c
Date: 2026-06-04 15:07:48
Message-ID: aiGUxEzo4o5_fRIq@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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};

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-06-04 15:16:20 Re: PSA: Planning to grease protocol connections during 19beta
Previous Message Ashutosh Bapat 2026-06-04 15:04:31 Re: (SQL/PGQ) cache lookup failed for label