From 2a944fbe98ed4408a5f0fd5693c398a9cebaf6d4 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Thu, 19 Dec 2024 22:07:22 +0300 Subject: [PATCH] tprintf: pacify clang warning. --- src/ccutil/tprintf.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ccutil/tprintf.h b/src/ccutil/tprintf.h index 1117812477..5e19d986d6 100644 --- a/src/ccutil/tprintf.h +++ b/src/ccutil/tprintf.h @@ -33,8 +33,11 @@ TESS_API FILE *get_debugfp(); // Main logging function. Trace printf. template -auto tprintf(const char *format, Types && ... args) { - return fprintf(get_debugfp(), format, std::forward(args)...); +auto tprintf(Types && ... args) { +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-security" + return fprintf(get_debugfp(), std::forward(args)...); +#pragma clang diagnostic pop } } // namespace tesseract