Suppress -Warray-bounds for ymfm

ymfm's fm_engine_base::output() contains OPL-specific rhythm code that
accesses m_operator[13]/[17], which is out-of-bounds when instantiated
for OPN (OPERATORS=12). The code is unreachable at runtime because
rhythm_enable() returns false for OPN, but newer clang (emscripten) flag
it statically.
This commit is contained in:
kichikuou
2026-04-14 20:25:58 +09:00
parent 24ef2289cc
commit 0461d95999
+4
View File
@@ -30,6 +30,10 @@ add_library(ymfm
deps/ymfm/src/ymfm_adpcm.cpp
deps/ymfm/src/ymfm_ssg.cpp)
target_include_directories(ymfm PUBLIC deps/ymfm/src)
# Suppress false-positive -Warray-bounds in ymfm_fm.ipp.
if (NOT MSVC)
target_compile_options(ymfm PRIVATE -Wno-array-bounds)
endif()
if (ANDROID)