Silence "may be used uninitialized" compiler warning.

Newer gcc warns that this "actual_arg_types" variable may be used
uninitialized, but visual inspection indicates there's no bug.  To
silence the warning, initialize the variable to zeros.

Bug: #19485
Reported-by: Hans Buschmann <buschmann@nidsa.net>
Tested-by: Erik Rijkers <er@xs4all.nl>
Tested-by: Hans Buschmann <buschmann@nidsa.net>
Reviewed-by: Tristan Partin <tristan@partin.io>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/19485-2b03231a775756f1%40postgresql.org
Discussion: https://postgr.es/m/6c52a1a6612948519468d46cb224a8c4%40nidsa.net
This commit is contained in:
Nathan Bossart
2026-06-18 11:29:49 -05:00
parent 4efef9d18e
commit 7fbbe75875
+1 -1
View File
@@ -4385,7 +4385,7 @@ recheck_cast_function_args(List *args, Oid result_type,
{
Form_pg_proc funcform = (Form_pg_proc) GETSTRUCT(func_tuple);
int nargs;
Oid actual_arg_types[FUNC_MAX_ARGS];
Oid actual_arg_types[FUNC_MAX_ARGS] = {0};
Oid declared_arg_types[FUNC_MAX_ARGS];
Oid rettype;
ListCell *lc;