diff --git a/common/debug.cpp b/common/debug.cpp index fff040c06..021117ec4 100644 --- a/common/debug.cpp +++ b/common/debug.cpp @@ -162,7 +162,11 @@ bool common_debug_cb_eval(struct ggml_tensor * t, bool ask, void * user_data) { } } - char src1_str[256] = { 0 }; + // Buffer must fit `src1->name` (up to GGML_MAX_NAME, which omnivoice + // bumps to 128) plus the bracketed shape string. Stay well above the + // worst case so -Werror=format-truncation on CI 3rd-party doesn't + // reject a write the compiler can't prove is bounded. + char src1_str[512] = { 0 }; if (src1) { snprintf(src1_str, sizeof(src1_str), "%s{%s}", src1->name, common_ggml_ne_string(src1).c_str()); } diff --git a/tools/omnivoice/CMakeLists.txt b/tools/omnivoice/CMakeLists.txt index 8cb2091d7..cf965da3f 100644 --- a/tools/omnivoice/CMakeLists.txt +++ b/tools/omnivoice/CMakeLists.txt @@ -105,12 +105,13 @@ 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 + # -Wshadow / -Wconversion intentionally omitted: omnivoice sources + # include llama's private headers (src/llama-arch.h, llama-adapter.h) + # and the public ggml-backend.h, none of which are shadow- or + # conversion-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 -Wconversion + -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion) endif()