diff options
author | Haru <haru@dotalux.com> | 2014-08-07 03:39:13 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-08-07 05:37:38 +0200 |
commit | c45e3fa9793a273a0eab40d1626bcda7d710552c (patch) | |
tree | 4f6c9d47770a15c8cbfe065f7ee9203f77e57022 /src/map/status.c | |
parent | caf89724767465ecf339c391bb6d7a937d563fb2 (diff) | |
download | hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.gz hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.bz2 hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.xz hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.zip |
Corrected several format-string errors through the code
- Functions that expect a printf-style format string are now marked as
such, so that gcc/clang will emit a warning warn you if you mismatch
format string and arguments.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/map/status.c b/src/map/status.c index 5ad096c1d..c8ed216f6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -10453,21 +10453,19 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { struct status_change_entry *sce; bl = map->id2bl(id); - if(!bl) { - ShowDebug("status_change_timer: Null pointer id: %d data: %d\n", id, data); + if (!bl) { + ShowDebug("status_change_timer: Null pointer id: %d data: %"PRIdPTR"\n", id, data); return 0; } sc = status->get_sc(bl); st = status->get_status_data(bl); - if(!(sc && (sce = sc->data[type]))) - { - ShowDebug("status_change_timer: Null pointer id: %d data: %d bl-type: %d\n", id, data, bl->type); + if (!(sc && (sce = sc->data[type]))) { + ShowDebug("status_change_timer: Null pointer id: %d data: %"PRIdPTR" bl-type: %d\n", id, data, bl->type); return 0; } - if( sce->timer != tid ) - { + if (sce->timer != tid) { ShowError("status_change_timer: Mismatch for type %d: %d != %d (bl id %d)\n",type,tid,sce->timer, bl->id); return 0; } @@ -10476,10 +10474,10 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { // set the next timer of the sce (don't assume the status still exists) #define sc_timer_next(t,f,i,d) do { \ - if( (sce=sc->data[type]) ) \ + if ((sce=sc->data[type])) \ sce->timer = timer->add((t),(f),(i),(d)); \ else \ - ShowError("status_change_timer: Unexpected NULL status change id: %d data: %d\n", id, data); \ + ShowError("status_change_timer: Unexpected NULL status change id: %d data: %"PRIdPTR"\n", id, data); \ } while(0) switch(type) { |