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

Commitf1a469c

Browse files
committed
Fix use of offsetof()
Using offsetof() with a run-time computed argument is not allowed ineither C or C++. Apparently, gcc allows it, but g++ doesn't.Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Reviewed-by: Thomas Munro <thomas.munro@enterprisedb.com>
1 parent3d39244 commitf1a469c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎contrib/bloom/blutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ _PG_init(void)
7575
bl_relopt_tab[i+1].optname=MemoryContextStrdup(TopMemoryContext,
7676
buf);
7777
bl_relopt_tab[i+1].opttype=RELOPT_TYPE_INT;
78-
bl_relopt_tab[i+1].offset= offsetof(BloomOptions,bitSize[i]);
78+
bl_relopt_tab[i+1].offset= offsetof(BloomOptions,bitSize[0])+sizeof(int)*i;
7979
}
8080
}
8181

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp