Skip to content

Commit

Permalink
Fix format strings for size_t arguments (CID 1402762, 1402767)
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jul 10, 2019
1 parent 2ba90f0 commit bdc7abf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/training/boxchar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void BoxChar::PrepareToWrite(std::vector<BoxChar*>* boxes) {
InsertNewlines(rtl_rules, vertical_rules, boxes);
InsertSpaces(rtl_rules, vertical_rules, boxes);
for (size_t i = 0; i < boxes->size(); ++i) {
if ((*boxes)[i]->box_ == nullptr) tprintf("Null box at index %u\n", i);
if ((*boxes)[i]->box_ == nullptr) tprintf("Null box at index %zu\n", i);
}
if (rtl_rules) {
ReorderRTLText(boxes);
Expand Down
2 changes: 1 addition & 1 deletion src/training/text2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ static int Main() {
if (strncmp(src_utf8.c_str(), "\xef\xbb\xbf", 3) == 0) {
src_utf8.erase(0, 3);
}
tlog(1, "Render string of size %d\n", src_utf8.length());
tlog(1, "Render string of size %zu\n", src_utf8.length());

if (FLAGS_render_ngrams || FLAGS_only_extract_font_properties) {
// Try to preserve behavior of old text2image by expanding inter-word
Expand Down

0 comments on commit bdc7abf

Please sign in to comment.