diff options
author | Sadie Powell <sadie@witchery.services> | 2024-01-08 13:06:23 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-01-08 13:11:50 +0000 |
commit | f083795c79fc062951d0253b4babf7e3b48c6ccb (patch) | |
tree | d40d77a317f31e7d8acb6db3df85dbd3e3efbda9 /modules/commands/ms_info.cpp | |
parent | 5db79c1e242d4c06d1aeb2b09f99b8254b7fb5de (diff) |
Fix various format string issues.
Diffstat (limited to 'modules/commands/ms_info.cpp')
-rw-r--r-- | modules/commands/ms_info.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/commands/ms_info.cpp b/modules/commands/ms_info.cpp index 38c99934b..b8b44085b 100644 --- a/modules/commands/ms_info.cpp +++ b/modules/commands/ms_info.cpp @@ -80,18 +80,19 @@ public: } else { - unsigned count = 0, i, end; - for (i = 0, end = mi->memos->size(); i < end; ++i) + size_t count = 0; + for (size_t i = 0; i < mi->memos->size(); ++i) if (mi->GetMemo(i)->unread) ++count; + if (count == mi->memos->size()) - source.Reply(_("%s currently has \002%d\002 memos; all of them are unread."), nname.c_str(), count); + source.Reply(_("%s currently has \002%zu\002 memos; all of them are unread."), nname.c_str(), count); else if (!count) - source.Reply(_("%s currently has \002%d\002 memos."), nname.c_str(), mi->memos->size()); + source.Reply(_("%s currently has \002%zu\002 memos."), nname.c_str(), mi->memos->size()); else if (count == 1) - source.Reply(_("%s currently has \002%d\002 memos, of which \0021\002 is unread."), nname.c_str(), mi->memos->size()); + source.Reply(_("%s currently has \002%zu\002 memos, of which \0021\002 is unread."), nname.c_str(), mi->memos->size()); else - source.Reply(_("%s currently has \002%d\002 memos, of which \002%d\002 are unread."), nname.c_str(), mi->memos->size(), count); + source.Reply(_("%s currently has \002%zu\002 memos, of which \002%zu\002 are unread."), nname.c_str(), mi->memos->size(), count); } if (!mi->memomax) { @@ -137,18 +138,19 @@ public: } else { - unsigned count = 0, i, end; - for (i = 0, end = mi->memos->size(); i < end; ++i) + size_t count = 0; + for (size_t i = 0; i < mi->memos->size(); ++i) if (mi->GetMemo(i)->unread) ++count; + if (count == mi->memos->size()) - source.Reply(_("You currently have \002%d\002 memos; all of them are unread."), count); + source.Reply(_("You currently have \002%zu\002 memos; all of them are unread."), count); else if (!count) - source.Reply(_("You currently have \002%d\002 memos."), mi->memos->size()); + source.Reply(_("You currently have \002%zu\002 memos."), mi->memos->size()); else if (count == 1) - source.Reply(_("You currently have \002%d\002 memos, of which \0021\002 is unread."), mi->memos->size()); + source.Reply(_("You currently have \002%zu\002 memos, of which \0021\002 is unread."), mi->memos->size()); else - source.Reply(_("You currently have \002%d\002 memos, of which \002%d\002 are unread."), mi->memos->size(), count); + source.Reply(_("You currently have \002%zu\002 memos, of which \002%zu\002 are unread."), mi->memos->size(), count); } if (!mi->memomax) |