From 217a4dda43205fdbcb9479cc42ef8dbea7945eff Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 4 Dec 2016 20:04:10 +0100 Subject: [PATCH] tesseract: Disable Leptonica messages Disable debugging and informational messages from Leptonica for release builds. Signed-off-by: Stefan Weil --- api/tesseractmain.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/tesseractmain.cpp b/api/tesseractmain.cpp index 0042467172..f758766d4d 100644 --- a/api/tesseractmain.cpp +++ b/api/tesseractmain.cpp @@ -388,6 +388,11 @@ int main(int argc, char** argv) { static GenericVector vars_vec; static GenericVector vars_values; +#if !defined(DEBUG) + // Disable debugging and informational messages from Leptonica. + setMsgSeverity(L_SEVERITY_WARNING); +#endif + #if defined(HAVE_TIFFIO_H) && defined(_WIN32) /* Show libtiff warnings on console (not in GUI). */ TIFFSetWarningHandler(Win32WarningHandler);