未验证 提交 800e0534 编写于 作者: W Wang Xin 提交者: GitHub

fix pragma-pack warning on macos (#47399)

上级 b160d09e
......@@ -221,7 +221,8 @@ if(APPLE)
-Werror=braced-scalar-init
-Werror=uninitialized
-Werror=tautological-constant-out-of-range-compare
-Werror=literal-conversion)
-Werror=literal-conversion
-Werror=pragma-pack)
endif()
if(WITH_HETERPS AND WITH_PSLIB)
......
......@@ -26,7 +26,7 @@ namespace paddle {
namespace operators {
namespace math {
#pragma pack(4)
#pragma pack(push, 4)
struct bloomfilter {
uint64_t magic_num;
uint64_t m;
......@@ -34,6 +34,8 @@ struct bloomfilter {
uint64_t count;
unsigned char bit_vector[1];
};
#pragma pack(pop)
int bloomfilter_get(const struct bloomfilter *bloomfilter,
const void *key,
size_t len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册