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/guild.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/guild.c')
-rw-r--r-- | src/map/guild.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 66376a2a8..8a34b7f4b 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1594,10 +1594,10 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd) * Notification of a relationship between 2 guilds *---------------------------------------------------*/ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2) { - struct guild *g[2]; - int guild_id[2]; - const char *guild_name[2]; - struct map_session_data *sd[2]; + struct guild *g[2] = { NULL }; + int guild_id[2] = { 0 }; + const char *guild_name[2] = { NULL }; + struct map_session_data *sd[2] = { NULL }; int j,i; guild_id[0] = guild_id1; @@ -1664,11 +1664,11 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members - struct map_session_data *sd; + struct map_session_data *msd; if(g[i]!=NULL) for(j=0;j<g[i]->max_member;j++) - if((sd=g[i]->member[j].sd)!=NULL) - clif->guild_allianceinfo(sd); + if((msd=g[i]->member[j].sd)!=NULL) + clif->guild_allianceinfo(msd); } return 0; } |