Skip to content

Commit

Permalink
tprintf: pacify clang warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Dec 19, 2024
1 parent d95e9f7 commit 2a944fb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ccutil/tprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ TESS_API FILE *get_debugfp();

// Main logging function. Trace printf.
template <typename ... Types>
auto tprintf(const char *format, Types && ... args) {
return fprintf(get_debugfp(), format, std::forward<Types>(args)...);
auto tprintf(Types && ... args) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-security"
return fprintf(get_debugfp(), std::forward<Types>(args)...);
#pragma clang diagnostic pop
}

} // namespace tesseract
Expand Down

0 comments on commit 2a944fb

Please sign in to comment.