Преглед на файлове

* [Fixed]:
- status.c:920: warning: 'mbl' might be used uninitialized in this function
- skill.c:6648: warning: 'matk_min' might be used uninitialized in this function
- skill.c:6648: warning: 'matk_max' might be used uninitialized in this function
- skill.c:2826: warning: 'sid' might be used uninitialized in this function

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6816 54d463be-8e91-2dee-dedb-b68131a5f0ec

Lance преди 19 години
родител
ревизия
559987d438
променени са 3 файла, в които са добавени 9 реда и са изтрити 4 реда
  1. 6 1
      Changelog-Trunk.txt
  2. 2 2
      src/map/skill.c
  3. 1 1
      src/map/status.c

+ 6 - 1
Changelog-Trunk.txt

@@ -4,7 +4,12 @@ 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/05/29
-	* [Optimized ]:
+	* [Fixed]:
+	  - status.c:920: warning: 'mbl' might be used uninitialized in this function
+	  - skill.c:6648: warning: 'matk_min' might be used uninitialized in this function
+	  - skill.c:6648: warning: 'matk_max' might be used uninitialized in this function
+	  - skill.c:2826: warning: 'sid' might be used uninitialized in this function [Lance]
+	* [Optimized]:
 	  - Removed unused variable (account_id) in storage_guild_storagesaved.
 	* [Optimized]:
 	  - Removed unused checks for unsigned data type and possible logic error for

+ 2 - 2
src/map/skill.c

@@ -2823,7 +2823,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl,int s
 	case HVAN_CAPRICE: //[blackhole89]
 		{
 			int ran=rand()%4;
-			int sid;
+			int sid = 0;
 			switch(ran)
 			{
 			case 0: sid=MG_COLDBOLT; break;
@@ -6645,7 +6645,7 @@ int skill_unit_onplace_timer(struct skill_unit *src,struct block_list *bl,unsign
 	struct status_data *tstatus, *sstatus;
 	struct status_change *tsc, *sc;
 	struct skill_unit_group_tickset *ts;
-	int matk_min, matk_max; //For Magic power...
+	int matk_min = 0, matk_max = 0; //For Magic power...
 	int type, skillid;
 	int diff=0;
 

+ 1 - 1
src/map/status.c

@@ -917,7 +917,7 @@ void status_calc_misc(struct status_data *status, int level)
 int status_calc_mob(struct mob_data* md, int first)
 {
 	struct status_data *status;
-	struct block_list *mbl;
+	struct block_list *mbl = NULL;
 	int flag=0;
 
 	//Check if we need custom base-status