Fix compile warnings, cast size_t to long unsigned int for printf
This commit is contained in:
parent
0259e68eb9
commit
3c2366248b
3 changed files with 3 additions and 3 deletions
|
@ -127,7 +127,7 @@ void SaveGroups(CFile &file)
|
|||
file.printf("--- MODULE: groups\n\n");
|
||||
|
||||
for (int g = 0; g < NUM_GROUPS; ++g) {
|
||||
file.printf("Group(%d, %d, {", g, Groups[g].getUnits().size());
|
||||
file.printf("Group(%d, %lu, {", g, (long unsigned int)Groups[g].getUnits().size());
|
||||
for (size_t i = 0; i < Groups[g].getUnits().size(); ++i) {
|
||||
file.printf("\"%s\", ", UnitReference(*Groups[g].getUnits()[i]).c_str());
|
||||
}
|
||||
|
|
|
@ -982,7 +982,7 @@ void SaveSelections(CFile &file)
|
|||
file.printf("--- MODULE: selection\n\n");
|
||||
|
||||
file.printf("SetGroupId(%d)\n", GroupId);
|
||||
file.printf("Selection(%d, {", Selected.size()); // TODO: remove
|
||||
file.printf("Selection(%lu, {", (long unsigned int)Selected.size()); // TODO: remove
|
||||
for (size_t i = 0; i != Selected.size(); ++i) {
|
||||
file.printf("\"%s\", ", UnitReference(*Selected[i]).c_str());
|
||||
}
|
||||
|
|
|
@ -1143,7 +1143,7 @@ static void InfoPanel_draw_multiple_selection()
|
|||
if (Selected.size() > UI.SelectedButtons.size()) {
|
||||
char buf[5];
|
||||
|
||||
sprintf(buf, "+%u", Selected.size() - UI.SelectedButtons.size());
|
||||
sprintf(buf, "+%lu", (long unsigned int)(Selected.size() - UI.SelectedButtons.size()));
|
||||
CLabel(*UI.MaxSelectedFont).Draw(UI.MaxSelectedTextX, UI.MaxSelectedTextY, buf);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue