mirror of
https://github.com/Dushistov/sdcv.git
synced 2025-12-16 09:51:56 +00:00
fix warnings about size_t %d -> %zu (C99)
This commit is contained in:
@@ -337,13 +337,13 @@ bool Library::process_phrase(const char *loc_str, read_line &io, bool force)
|
|||||||
}//if (!force)
|
}//if (!force)
|
||||||
|
|
||||||
if (!show_all_results && !force) {
|
if (!show_all_results && !force) {
|
||||||
printf(_("Found %d items, similar to %s.\n"), res_list.size(),
|
printf(_("Found %zu items, similar to %s.\n"), res_list.size(),
|
||||||
utf8_output ? str : utf8_to_locale_ign_err(str).c_str());
|
utf8_output ? str : utf8_to_locale_ign_err(str).c_str());
|
||||||
for (size_t i=0; i<res_list.size(); ++i) {
|
for (size_t i=0; i<res_list.size(); ++i) {
|
||||||
string loc_bookname, loc_def;
|
string loc_bookname, loc_def;
|
||||||
loc_bookname=utf8_to_locale_ign_err(res_list[i].bookname);
|
loc_bookname=utf8_to_locale_ign_err(res_list[i].bookname);
|
||||||
loc_def=utf8_to_locale_ign_err(res_list[i].def);
|
loc_def=utf8_to_locale_ign_err(res_list[i].def);
|
||||||
printf("%d)%s-->%s\n", i,
|
printf("%zu)%s-->%s\n", i,
|
||||||
utf8_output ? res_list[i].bookname.c_str() : loc_bookname.c_str(),
|
utf8_output ? res_list[i].bookname.c_str() : loc_bookname.c_str(),
|
||||||
utf8_output ? res_list[i].def.c_str() : loc_def.c_str());
|
utf8_output ? res_list[i].def.c_str() : loc_def.c_str());
|
||||||
}
|
}
|
||||||
@@ -364,12 +364,12 @@ bool Library::process_phrase(const char *loc_str, read_line &io, bool force)
|
|||||||
} else if (choise==-1)
|
} else if (choise==-1)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
printf(_("Invalid choice.\nIt must be from 0 to %d or -1.\n"),
|
printf(_("Invalid choice.\nIt must be from 0 to %zu or -1.\n"),
|
||||||
res_list.size()-1);
|
res_list.size()-1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sdcv_pager pager(force);
|
sdcv_pager pager(force);
|
||||||
fprintf(pager.get_stream(), _("Found %d items, similar to %s.\n"),
|
fprintf(pager.get_stream(), _("Found %zu items, similar to %s.\n"),
|
||||||
res_list.size(), utf8_output ? str : utf8_to_locale_ign_err(str).c_str());
|
res_list.size(), utf8_output ? str : utf8_to_locale_ign_err(str).c_str());
|
||||||
for (PSearchResult ptr=res_list.begin(); ptr!=res_list.end(); ++ptr)
|
for (PSearchResult ptr=res_list.begin(); ptr!=res_list.end(); ++ptr)
|
||||||
print_search_result(pager.get_stream(), *ptr);
|
print_search_result(pager.get_stream(), *ptr);
|
||||||
|
|||||||
Reference in New Issue
Block a user