From d3689f2b3f4084150332feb5f350136cde6913e5 Mon Sep 17 00:00:00 2001 From: Shaw Date: Tue, 19 May 2026 02:06:31 -0700 Subject: [PATCH] fix(omnivoice): drop -Wshadow to unblock LLAMA_FATAL_WARNINGS builds omnivoice_lib sources include llama's private headers (src/llama-arch.h, src/llama-adapter.h, ...) and the public ggml-backend.h. None of those are shadow-clean upstream: ggml-backend.h:427: 'ggml_backend_graph_copy' hides constructor for 'struct ggml_backend_graph_copy' llama-arch.h:623: declaration of 'arch' shadows a member of 'LLM_TN' llama-adapter.h:60: declaration of 'a'/'b' shadows a member of 'llama_adapter_lora_weight' Under `-DLLAMA_FATAL_WARNINGS=ON` (CI 3rd-party / ubuntu-24-llguidance) these become -Werror and break the build through no fault of omnivoice's own sources. Drop -Wshadow from omnivoice_lib's compile options. Keep -Wall -Wextra -Wconversion so omnivoice's own code is still warning-checked. omnivoice (shared) and omnivoice-test-abi-c already don't enable -Wshadow. --- tools/omnivoice/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/omnivoice/CMakeLists.txt b/tools/omnivoice/CMakeLists.txt index 8645698f8..8cb2091d7 100644 --- a/tools/omnivoice/CMakeLists.txt +++ b/tools/omnivoice/CMakeLists.txt @@ -105,8 +105,12 @@ if(MSVC) target_compile_options(omnivoice_lib PRIVATE /W4 /wd4100 /wd4505) else() + # -Wshadow intentionally omitted: omnivoice sources include llama's + # private headers + the public ggml-backend.h, neither of which are + # shadow-clean upstream. Under -DLLAMA_FATAL_WARNINGS=ON those + # warnings escalate to -Werror and break the 3rd-party CI lane. target_compile_options(omnivoice_lib PRIVATE - -Wall -Wextra -Wshadow -Wconversion + -Wall -Wextra -Wconversion -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion) endif()