mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-11 23:19:04 +08:00
api: Fix printing of a size_t value
size_t is not always the same as long, especially not for 64 bit Windows: api/pdfrenderer.cpp:549:31: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'size_t {aka long long unsigned int}' [-Wformat=] size_t normally requires a format string "%zu", but this is unsupported by Visual Studio, so use a type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
c0f4e86ef5
commit
cd946dc30d
@ -544,9 +544,9 @@ bool TessPDFRenderer::BeginDocumentHandler() {
|
|||||||
n = snprintf(buf, sizeof(buf),
|
n = snprintf(buf, sizeof(buf),
|
||||||
"5 0 obj\n"
|
"5 0 obj\n"
|
||||||
"<<\n"
|
"<<\n"
|
||||||
" /Length %ld /Filter /FlateDecode\n"
|
" /Length %lu /Filter /FlateDecode\n"
|
||||||
">>\n"
|
">>\n"
|
||||||
"stream\n", len);
|
"stream\n", (unsigned long)len);
|
||||||
if (n >= sizeof(buf)) {
|
if (n >= sizeof(buf)) {
|
||||||
lept_free(comp);
|
lept_free(comp);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user