mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
Suppress -Wcast-align for vendored tomlc17.c
The R260618 update's cell_realloc() pattern casts a char* arena pointer to various toml_datum_t*/toml_arritem_t*-family pointers, which trips -Werror=cast-align under the strict-warning CI configs (Parallel Special, ROS3 VFD). Suppress per-file rather than patching vendored source, consistent with the existing -fvisibility=hidden override for this same file.
This commit is contained in:
+4
-1
@@ -1002,8 +1002,11 @@ endif ()
|
||||
|
||||
list (APPEND H5Z_SOURCES ${HDF5_SRC_DIR}/tomlc17/tomlc17.c)
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||
# -Wno-cast-align: this vendored file's cell_realloc() intentionally casts
|
||||
# a char* arena pointer to various toml_datum_t*/toml_arritem_t*-family
|
||||
# pointers; suppress here rather than patching upstream source.
|
||||
set_source_files_properties (${HDF5_SRC_DIR}/tomlc17/tomlc17.c
|
||||
PROPERTIES COMPILE_OPTIONS "-fvisibility=hidden"
|
||||
PROPERTIES COMPILE_OPTIONS "-fvisibility=hidden;-Wno-cast-align"
|
||||
)
|
||||
endif ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user