Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf3834c1

Browse files
committed
Fix C23 compiler warning
The approach of declaring a function pointer with an empty argumentlist and hoping that the compiler will not complain about casting itto another type no longer works with C23, because foo() is nowequivalent to foo(void).We don't need to do this here. With a few struct forward declarationswe can supply a correct argument list without having to pull inanother header file.(This is the only new warning with C23. Together with the previousfixa67a496, 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.orgDiscussion:https://www.postgresql.org/message-id/flat/87o72eo9iu.fsf%40gentoo.org
1 parentad89c8b commitf3834c1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/include/nodes/pathnodes.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,6 +1101,9 @@ typedef struct IndexOptInfo IndexOptInfo;
11011101
#defineHAVE_INDEXOPTINFO_TYPEDEF 1
11021102
#endif
11031103

1104+
structIndexPath;/* avoid including pathnodes.h here */
1105+
structPlannerInfo;/* avoid including pathnodes.h here */
1106+
11041107
structIndexOptInfo
11051108
{
11061109
pg_node_attr(no_copy_equal,no_read,no_query_jumble)
@@ -1200,7 +1203,7 @@ struct IndexOptInfo
12001203
boolamcanmarkpos;
12011204
/* AM's cost estimator */
12021205
/* Rather than include amapi.h here, we declare amcostestimate like this */
1203-
void(*amcostestimate) ()pg_node_attr(read_write_ignore);
1206+
void(*amcostestimate) (structPlannerInfo*,structIndexPath*,double,Cost*,Cost*,Selectivity*,double*,double*)pg_node_attr(read_write_ignore);
12041207
};
12051208

12061209
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp