Skip to content

Commit 2a944fb

Browse files
committed
tprintf: pacify clang warning.
1 parent d95e9f7 commit 2a944fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ccutil/tprintf.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ TESS_API FILE *get_debugfp();
3333

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

4043
} // namespace tesseract

0 commit comments

Comments
 (0)