summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-19 18:24:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-19 18:24:22 +0300
commit8dc7572164d1f630fed49e695d4bf62ea8e09a15 (patch)
tree66138d10ef1fd4f6d14666a5a078641e4c9f1b77 /src/map/pc.c
parentc2c1322b230dc0f564397ac68615640f1083ee56 (diff)
downloadhercules-8dc7572164d1f630fed49e695d4bf62ea8e09a15.tar.gz
hercules-8dc7572164d1f630fed49e695d4bf62ea8e09a15.tar.bz2
hercules-8dc7572164d1f630fed49e695d4bf62ea8e09a15.tar.xz
hercules-8dc7572164d1f630fed49e695d4bf62ea8e09a15.zip
Fix all known warnings from compiler flags -Wformat*
Add all missing -Wformat flags into configure.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index fb6fc523c..919205b81 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1212,7 +1212,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
//display login notice
ShowInfo("'"CL_WHITE"%s"CL_RESET"' logged in."
" (AID/CID: '"CL_WHITE"%d/%d"CL_RESET"',"
- " IP: '"CL_WHITE"%d.%d.%d.%d"CL_RESET"',"
+ " IP: '"CL_WHITE"%u.%u.%u.%u"CL_RESET"',"
" Group '"CL_WHITE"%d"CL_RESET"').\n",
sd->status.name, sd->status.account_id, sd->status.char_id,
CONVIP(ip), sd->group_id);
@@ -7196,7 +7196,7 @@ int pc_resetstate(struct map_session_data* sd)
// New statpoint table used here - Dexity
if (sd->status.base_level > MAX_LEVEL) {
//pc->statp[] goes out of bounds, can't reset!
- ShowError("pc_resetstate: Can't reset stats of %d:%d, the base level (%d) is greater than the max level supported (%d)\n",
+ ShowError("pc_resetstate: Can't reset stats of %d:%d, the base level (%u) is greater than the max level supported (%d)\n",
sd->status.account_id, sd->status.char_id, sd->status.base_level, MAX_LEVEL);
return 0;
}
@@ -9565,7 +9565,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
pos = pc->equippoint(sd,n); //With a few exceptions, item should go in all specified slots.
if(battle_config.battle_log)
- ShowInfo("equip %d(%d) %x:%x\n",sd->status.inventory[n].nameid,n,id?id->equip:0,req_pos);
+ ShowInfo("equip %d(%d) %x:%x\n", sd->status.inventory[n].nameid, n, (unsigned int)(id ? id->equip : 0), (unsigned int)req_pos);
if(!pc->isequip(sd,n) || !(pos&req_pos) || sd->status.inventory[n].equip != 0 || sd->status.inventory[n].attribute==1 ) { // [Valaris]
// FIXME: pc->isequip: equip level failure uses 2 instead of 0
clif->equipitemack(sd,n,0,EIA_FAIL); // fail
@@ -9773,7 +9773,7 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag)
}
if(battle_config.battle_log)
- ShowInfo("unequip %d %x:%x\n",n,pc->equippoint(sd,n),sd->status.inventory[n].equip);
+ ShowInfo("unequip %d %x:%x\n", n, (unsigned int)(pc->equippoint(sd, n)), sd->status.inventory[n].equip);
if(!sd->status.inventory[n].equip){ //Nothing to unequip
clif->unequipitemack(sd,n,0,UIA_FAIL);
@@ -10927,7 +10927,7 @@ int pc_readdb(void) {
}
maxlv = atoi(split[0]);
if (maxlv > MAX_LEVEL) {
- ShowWarning("pc_readdb: Specified max level %u for job %d is beyond server's limit (%u).\n ", maxlv, job_id, MAX_LEVEL);
+ ShowWarning("pc_readdb: Specified max level %u for job %d is beyond server's limit (%d).\n ", maxlv, job_id, MAX_LEVEL);
maxlv = MAX_LEVEL;
}
count++;
@@ -11353,7 +11353,7 @@ void pc_autotrade_update(struct map_session_data *sd, enum e_pc_autotrade_update
if( sd->vending[i].amount == 0 )
continue;
- if (SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s` (`char_id`,`itemkey`,`amount`,`price`) VALUES ('%d','%d','%d','%d')",
+ if (SQL_ERROR == SQL->Query(map->mysql_handle, "INSERT INTO `%s` (`char_id`,`itemkey`,`amount`,`price`) VALUES ('%d','%d','%d','%u')",
map->autotrade_data_db,
sd->status.char_id,
sd->status.cart[sd->vending[i].index].id,