Fix C23 compiler warning
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 22 Oct 2024 06:12:43 +0000 (08:12 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 22 Oct 2024 06:17:42 +0000 (08:17 +0200)
commitd2b4b4c2259e21ceaf05e393769b69728bfbee99
tree556bab7423786c643a2b35765aebde5885483f7d
parent45e0ba30fc40581f320fac17ad8b4e0676e1b3b5
Fix C23 compiler warning

The approach of declaring a function pointer with an empty argument
list and hoping that the compiler will not complain about casting it
to another type no longer works with C23, because foo() is now
equivalent to foo(void).

We don't need to do this here.  With a few struct forward declarations
we can supply a correct argument list without having to pull in
another header file.

(This is the only new warning with C23.  Together with the previous
fix a67a49648d9, this makes the whole code compile cleanly under C23.)

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/95c6a9bf-d306-43d8-b880-664ef08f2944%40eisentraut.org
src/include/nodes/pathnodes.h