diff options
author | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 04:13:46 +0000 |
---|---|---|
committer | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-30 04:13:46 +0000 |
commit | de3e9a7aea38e374a91d9f036da043f14e58b9f3 (patch) | |
tree | 0db9e5ba7201a1fc332b8abe87d75d6c3069c7ee /src | |
parent | a97c2837c050d53bed4010f3399dcd5d0ad8b269 (diff) | |
download | hercules-de3e9a7aea38e374a91d9f036da043f14e58b9f3.tar.gz hercules-de3e9a7aea38e374a91d9f036da043f14e58b9f3.tar.bz2 hercules-de3e9a7aea38e374a91d9f036da043f14e58b9f3.tar.xz hercules-de3e9a7aea38e374a91d9f036da043f14e58b9f3.zip |
-Fix old warnings. 1st step to get ride of -wno flag in configure.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16987 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/battle.c | 5 | ||||
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/intif.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 8 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7f523e649..a67c67108 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1003,7 +1003,7 @@ ACMD_FUNC(jobchange) if (!message || !*message || sscanf(message, "%d %d", &job, &upper) < 1) { int i, found = 0; - + for (i = JOB_NOVICE; i < JOB_MAX; ++i) { if (strncmpi(message, job_name(i), 16) == 0) { job = i; @@ -7410,7 +7410,7 @@ ACMD_FUNC(mapflag) clif_displaymessage(sd->fd,atcmd_output);\ return 0;\ } - unsigned char flag_name[100]; + char flag_name[100]; int flag=0,i; nullpo_retr(-1, sd); memset(flag_name, '\0', sizeof(flag_name)); diff --git a/src/map/battle.c b/src/map/battle.c index 21649228b..27f67ee3b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3472,7 +3472,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list short s_ele = 0; unsigned int skillratio = 100; //Skill dmg modifiers. - struct map_session_data *sd, *tsd; + TBL_PC *sd; +// TBL_PC *tsd; struct Damage ad; struct status_data *sstatus = status_get_status_data(src); struct status_data *tstatus = status_get_status_data(target); @@ -3499,7 +3500,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list flag.imdef = nk &NK_IGNORE_DEF?1:0; sd = BL_CAST(BL_PC, src); - tsd = BL_CAST(BL_PC, target); +// tsd = BL_CAST(BL_PC, target); if (skill_num == SO_PSYCHIC_WAVE) { struct status_change *sc = status_get_sc(src); diff --git a/src/map/clif.c b/src/map/clif.c index b3dc2318b..362930b84 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5345,7 +5345,7 @@ void clif_displaymessage(const int fd, const char *mes) WFIFOHEAD(fd, 5 + len); WFIFOW(fd,0) = 0x8e; WFIFOW(fd,2) = 5 + len; // 4 + len + NULL teminate - safestrncpy(WFIFOP(fd,4), line, len + 1); + safestrncpy((char *)WFIFOP(fd,4), line, len + 1); WFIFOSET(fd, 5 + len); } line = strtok(NULL, "\n"); @@ -6438,7 +6438,7 @@ void clif_party_message(struct party_data *p, int account_id, const char *mes, i WBUFW(buf,0)=0x109; WBUFW(buf,2)=len+8; WBUFL(buf,4)=account_id; - safestrncpy(WBUFP(buf,8), mes, len); + safestrncpy((char *)WBUFP(buf,8), mes, len); clif_send(buf,len+8,&sd->bl,PARTY); } } @@ -13806,7 +13806,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd) safestrncpy(msg.send_name, sd->status.name, NAME_LENGTH); safestrncpy(msg.dest_name, (char *)RFIFOP(fd,4), NAME_LENGTH); safestrncpy(msg.title, (char *)RFIFOP(fd,28), MAIL_TITLE_LENGTH); - + if (msg.title[0] == '\0') { return; // Message has no length and somehow client verification was skipped. } diff --git a/src/map/intif.c b/src/map/intif.c index 7ae455d93..8c66db6be 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -2134,7 +2134,7 @@ void intif_request_accinfo(int u_fd, int aid, int group_id, char *query) WFIFOL(inter_fd,2) = u_fd; WFIFOL(inter_fd,6) = aid; WFIFOL(inter_fd,10) = group_id; - safestrncpy(WFIFOP(inter_fd,14), query, NAME_LENGTH); + safestrncpy((char *)WFIFOP(inter_fd,14), query, NAME_LENGTH); WFIFOSET(inter_fd,2 + 4 + 4 + 4 + NAME_LENGTH); diff --git a/src/map/status.c b/src/map/status.c index 7bca41572..fcefedbbe 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1942,7 +1942,7 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct return cap_value(str, 0, USHRT_MAX); } -#ifndef RENEWAL +#ifndef RENEWAL static inline unsigned short status_base_matk_min(const struct status_data* status){ return status->int_+(status->int_/7)*(status->int_/7); } static inline unsigned short status_base_matk_max(const struct status_data* status){ return status->int_+(status->int_/5)*(status->int_/5); } #else @@ -3806,7 +3806,7 @@ void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag) status->matk_min = status_calc_matk(bl, sc, status->matk_min); status->matk_max = status_calc_matk(bl, sc, status->matk_max); - if (bl->type&BL_HOM && battle_config.hom_setting&0x20 //Hom Min Matk is always the same as Max Matk + if ((bl->type&BL_HOM && battle_config.hom_setting&0x20) //Hom Min Matk is always the same as Max Matk || ( sc && sc->data[SC_RECOGNIZEDSPELL] )) status->matk_min = status->matk_max; @@ -6210,7 +6210,7 @@ int status_get_sc_def(struct block_list *bl, enum sc_type type, int rate, int ti tick -= (status->int_ + status->luk) / 20 * 1000; break; case SC_STASIS: - //5 second (fixed) + { Stasis Skill level * 5 - (Target’s VIT + DEX) / 20 } + //5 second (fixed) + { Stasis Skill level * 5 - (Target�s VIT + DEX) / 20 } tick -= (status->vit + status->dex) / 20 * 1000; break; case SC_WHITEIMPRISON: @@ -10555,7 +10555,7 @@ int status_change_timer_sub(struct block_list *bl, va_list ap) /*========================================== * Clears buffs/debuffs of a character. - * type&1 -> buffs, type&2 -> debuffs + * type&1 -> buffs, type&2 -> debuffs * type&4 -> especific debuffs(implemented with refresh) *------------------------------------------*/ int status_change_clear_buffs(struct block_list *bl, int type) |