Permalink
Browse files

Remove warnings from clang.

%zu is an unsigned(u) type of size size_t(z).
That makes it portable between 32 and 64 bit architectures without
warnings.
  • Loading branch information...
1 parent 47d32d8 commit 9042fed93af0ada27f840fbdc274dd0427e25772 @stefanbeller stefanbeller committed Sep 17, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 src/GameStateLoad.cpp
  2. +2 −2 src/ItemManager.cpp
View
@@ -45,7 +45,7 @@ GameStateLoad::GameStateLoad() : GameState() {
loaded = false;
label_loading = new WidgetLabel();
-
+
for (int i = 0; i < GAME_SLOT_MAX; i++) {
label_name[i] = new WidgetLabel();
label_level[i] = new WidgetLabel();
@@ -68,7 +68,7 @@ GameStateLoad::GameStateLoad() : GameState() {
button_alternate->label = msg->get("Delete Save");
button_alternate->enabled = false;
- // Read positions from config file
+ // Read positions from config file
FileParser infile;
if (infile.open(mods->locate("menus/gameload.txt"))) {
@@ -307,7 +307,7 @@ void GameStateLoad::loadPreview(int slot) {
for (unsigned int i=0; i<equipped[slot].size(); i++) {
if ((unsigned)equipped[slot][i] > items->items.size()-1){
- fprintf(stderr, "Item with id=%d out of bounds 1-%d. Your savegame is broken or you might use incompatible savegame/mod\nQuitting to avoid savegame rewriting\n", equipped[slot][i], items->items.size()-1);
+ fprintf(stderr, "Item with id=%d out of bounds 1-%zu. Your savegame is broken or you might use incompatible savegame/mod\nQuitting to avoid savegame rewriting\n", equipped[slot][i], items->items.size()-1);
SDL_Quit();
exit(1);
}
View
@@ -115,7 +115,7 @@ void ItemManager::load(const string& filename) {
continue;
}
if (id_line) continue;
-
+
if (infile.key == "name")
items[id].name = msg->get(infile.val);
else if (infile.key == "level")
@@ -623,7 +623,7 @@ TooltipData ItemManager::getTooltip(int item, StatBlock *stats, bool vendor_view
bonus_counter = 0;
modifier = "";
- tip.lines[tip.num_lines++];
+ tip.lines[tip.num_lines++] = "";
tip.colors[tip.num_lines] = set.color;
tip.lines[tip.num_lines++] = msg->get("Set: ") + msg->get(item_sets[items[item].set].name);

0 comments on commit 9042fed

Please sign in to comment.