Fix some format strings

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-01-08 18:49:21 +01:00
parent ea4f9de4f4
commit 209c1df599
3 changed files with 5 additions and 5 deletions

View File

@ -257,7 +257,7 @@ void WERD::copy_on(WERD* other) {
void WERD::print() {
tprintf("Blanks= %d\n", blanks);
bounding_box().print();
tprintf("Flags = %d = 0%o\n", flags.to_ulong(), flags.to_ulong());
tprintf("Flags = %lu = 0%lo\n", flags.to_ulong(), flags.to_ulong());
tprintf(" W_SEGMENTED = %s\n", flags[W_SEGMENTED] ? "TRUE" : "FALSE");
tprintf(" W_ITALIC = %s\n", flags[W_ITALIC] ? "TRUE" : "FALSE");
tprintf(" W_BOL = %s\n", flags[W_BOL] ? "TRUE" : "FALSE");

View File

@ -197,10 +197,10 @@ void TessdataManager::Clear() {
// Prints a directory of contents.
void TessdataManager::Directory() const {
tprintf("Version string:%s\n", VersionString().c_str());
int offset = TESSDATA_NUM_ENTRIES * sizeof(int64_t);
auto offset = TESSDATA_NUM_ENTRIES * sizeof(int64_t);
for (unsigned i = 0; i < TESSDATA_NUM_ENTRIES; ++i) {
if (!entries_[i].empty()) {
tprintf("%d:%s:size=%d, offset=%d\n", i, kTessdataFileSuffixes[i],
tprintf("%u:%s:size=%zu, offset=%zu\n", i, kTessdataFileSuffixes[i],
entries_[i].size(), offset);
offset += entries_[i].size();
}

View File

@ -46,8 +46,8 @@ struct UnicharRating {
// Print debug info.
void Print() const {
tprintf("Unichar-id=%d, rating=%g, adapted=%d, config=%d, misses=%d,"
" %d fonts\n", unichar_id, rating, adapted, config, feature_misses,
tprintf("Unichar-id=%d, rating=%g, adapted=%d, config=%d, misses=%u,"
" %zu fonts\n", unichar_id, rating, adapted, config, feature_misses,
fonts.size());
}