Fix use of offsetof()
Using offsetof() with a run-time computed argument is not allowed in either 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>
This commit is contained in:
parent
3d39244e6e
commit
f1a469c9f1
|
@ -75,7 +75,7 @@ _PG_init(void)
|
|||
bl_relopt_tab[i + 1].optname = MemoryContextStrdup(TopMemoryContext,
|
||||
buf);
|
||||
bl_relopt_tab[i + 1].opttype = RELOPT_TYPE_INT;
|
||||
bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[i]);
|
||||
bl_relopt_tab[i + 1].offset = offsetof(BloomOptions, bitSize[0]) + sizeof(int) * i;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue