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:
Scot Breitenfeld
2026-07-15 23:10:52 -05:00
parent bbf30ae07d
commit 10c2ac2555
+4 -1
View File
@@ -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 ()