Fixed 'range' might be used uninitialized warning

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8723 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
toms 2006-09-12 18:39:57 +00:00
parent c6142c3f39
commit 7b6be24f47
2 changed files with 4 additions and 4 deletions

View File

@ -4,6 +4,7 @@ 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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/12 2006/09/12
* Fixed 'range' might be used uninitialized warning [Toms]
* Added Jaguar's sql script to convert all tables to MyISAM. It's located * Added Jaguar's sql script to convert all tables to MyISAM. It's located
in sql-files/convert_engine.sql WARNING: Using MyISAM is much faster than in sql-files/convert_engine.sql WARNING: Using MyISAM is much faster than
InnoDB, but you are strongly recommended to backup your database before InnoDB, but you are strongly recommended to backup your database before

View File

@ -8982,7 +8982,7 @@ static int skill_sit_out (struct block_list *bl, va_list ap)
int skill_sit (struct map_session_data *sd, int type) int skill_sit (struct map_session_data *sd, int type)
{ {
int flag = 0; int flag = 0;
int range, lv; int range = 0, lv;
nullpo_retr(0, sd); nullpo_retr(0, sd);
@ -8994,7 +8994,7 @@ int skill_sit (struct map_session_data *sd, int type)
flag|=2; flag|=2;
range = skill_get_splash(TK_HPTIME, lv); range = skill_get_splash(TK_HPTIME, lv);
} }
else if ((lv= pc_checkskill(sd,TK_SPTIME)) > 0) { else if ((lv = pc_checkskill(sd,TK_SPTIME)) > 0) {
flag|=2; flag|=2;
range = skill_get_splash(TK_SPTIME, lv); range = skill_get_splash(TK_SPTIME, lv);
} }
@ -9006,8 +9006,7 @@ int skill_sit (struct map_session_data *sd, int type)
map_foreachinrange(skill_sit_in,&sd->bl, range, BL_PC, flag); map_foreachinrange(skill_sit_in,&sd->bl, range, BL_PC, flag);
return 0; return 0;
} }
else else if(type==0) {
if(type==0) {
if (map_foreachinrange(skill_sit_count,&sd->bl, range, BL_PC, flag) < 2) if (map_foreachinrange(skill_sit_count,&sd->bl, range, BL_PC, flag) < 2)
map_foreachinrange(skill_sit_out,&sd->bl, range, BL_PC, flag); map_foreachinrange(skill_sit_out,&sd->bl, range, BL_PC, flag);
return 0; return 0;