diff options
author | Haru <haru@dotalux.com> | 2013-12-10 19:48:55 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-12-17 01:11:33 +0100 |
commit | 15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48 (patch) | |
tree | c5dd5b25003f8c21381c7a2e1f010dba71e40b90 /src/map/intif.c | |
parent | a23d072a66d2569ba13921522be3c82ae9aad576 (diff) | |
download | hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.gz hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.bz2 hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.tar.xz hercules-15a0f6dea6f4f3c5adc9a1bc9e7e8be81cc49c48.zip |
Fixed several compiler warnings
- Warnings detected thanks to Xcode's compiler settings (more strict by
default) and clang, warnings mostly but not only related to data sizes
on 64 bit systems, that were silenced until now by very lax compiler
settings.
- This also decreases by a great deal the amount of warnings produced by
MSVC in x64 mode (for the adventurous ones who tried that)
- Also fixed (or silenced in case of false positives) the potential
issues pointed out by the (awesome) clang static analyzer.
- Patch co-produced with Ind, I'm merging and committing in his place!
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index df7a16db7..75ca714c9 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -125,7 +125,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name) } // GM Send a message -int intif_broadcast(const char* mes, int len, int type) +int intif_broadcast(const char* mes, size_t len, int type) { int lp = (type|BC_COLOR_MASK) ? 4 : 0; @@ -155,7 +155,7 @@ int intif_broadcast(const char* mes, int len, int type) return 0; } -int intif_broadcast2(const char* mes, int len, unsigned long fontColor, short fontType, short fontSize, short fontAlign, short fontY) +int intif_broadcast2(const char* mes, size_t len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY) { // Send to the local players clif->broadcast2(NULL, mes, len, fontColor, fontType, fontSize, fontAlign, fontY, ALL_CLIENT); @@ -201,7 +201,7 @@ int intif_main_message(struct map_session_data* sd, const char* message) } // The transmission of Wisp/Page to inter-server (player not found on this server) -int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, int mes_len) +int intif_wis_message(struct map_session_data *sd, char *nick, char *mes, size_t mes_len) { nullpo_ret(sd); if (intif->CheckForCharServer()) @@ -247,7 +247,7 @@ int intif_wis_replay(int id, int flag) // The transmission of GM only Wisp/Page from server to inter-server int intif_wis_message_to_gm(char *wisp_name, int permission, char *mes) { - int mes_len; + size_t mes_len; if (intif->CheckForCharServer()) return 0; mes_len = strlen(mes) + 1; // + null @@ -560,7 +560,7 @@ int intif_guild_addmember(int guild_id,struct guild_member *m) } // Request a new leader for guild -int intif_guild_change_gm(int guild_id, const char* name, int len) +int intif_guild_change_gm(int guild_id, const char* name, size_t len) { if (intif->CheckForCharServer()) return 0; |