From 125ce882681dc12d8a3d8c6c80d8f77aac83a95b Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Thu, 22 Feb 2024 12:37:14 -0800 Subject: [PATCH] Suppress gcc warning Accept that our usage is non-portable: https://stackoverflow.com/questions/3129916/what-is-wrong-with-this-use-of-offsetof --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dde1d8c..e9753fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,8 @@ add_compile_options(-fdata-sections -ffunction-sections) include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/third_party/valgrind) if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - add_compile_options(-Wno-maybe-uninitialized) + add_compile_options(-Wno-maybe-uninitialized + $<$:-Wno-invalid-offsetof>) endif() if(APPLE)