From 139975b43ca2e325add8d09a917b36e43716046e Mon Sep 17 00:00:00 2001 From: Lance Date: Sun, 11 Jun 2006 05:30:23 +0000 Subject: * [Fixed] - Compilation warnings on guild.c and int_guild.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7088 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/char/int_guild.c | 2 +- src/char_sql/int_guild.c | 2 +- src/map/guild.c | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ede7c247f..d6afdbec6 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/06/09 + * [Fixed] + - Compilation warnings on guild.c and int_guild.c [Lance] * Added structure party_data and party_member_data to the map server to hold party-specific required information about parties including Monk/TK/SG/SN states and party member count. Family information is still diff --git a/src/char/int_guild.c b/src/char/int_guild.c index a676de285..0978d0921 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1209,7 +1209,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int { unsigned int exp, old_exp=g->member[i].exp; g->member[i].exp=*((unsigned int *)data); - if (g->member[i].exp > old_exp) + if (g->member[i].exp > (signed int)old_exp && old_exp < INT_MAX) { exp = g->member[i].exp - old_exp; if (guild_exp_rate != 100) diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c index 23cb95bb7..4e89dbf93 100644 --- a/src/char_sql/int_guild.c +++ b/src/char_sql/int_guild.c @@ -1527,7 +1527,7 @@ int mapif_parse_GuildMemberInfoChange(int fd,int guild_id,int account_id,int cha { // EXP unsigned int exp, old_exp=g->member[i].exp; g->member[i].exp=*((unsigned int *)data); - if (g->member[i].exp > old_exp) + if (g->member[i].exp > (signed int)old_exp && old_exp < INT_MAX) { exp = g->member[i].exp - old_exp; if (guild_exp_rate != 100) diff --git a/src/map/guild.c b/src/map/guild.c index 8e4a16901..689b67d93 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -367,7 +367,7 @@ int guild_payexp_timer_sub(DBKey dataid, void *data, va_list ap) return 0; } - if (g->member[i].exp > UINT_MAX - c->exp) + if ((long long)g->member[i].exp > (long long)(UINT_MAX - c->exp)) g->member[i].exp = UINT_MAX; else g->member[i].exp+= c->exp; -- cgit v1.2.3-70-g09d2