Commit d2b4b4c
committed
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 a67a496, 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.org1 parent 45e0ba3 commit d2b4b4c
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1110 | 1113 | | |
1111 | 1114 | | |
1112 | 1115 | | |
| |||
1206 | 1209 | | |
1207 | 1210 | | |
1208 | 1211 | | |
1209 | | - | |
| 1212 | + | |
1210 | 1213 | | |
1211 | 1214 | | |
1212 | 1215 | | |
| |||
0 commit comments