Explorar el Código

Removed some unused variables that appeared in the last commit (r12584).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12585 54d463be-8e91-2dee-dedb-b68131a5f0ec
Kevin hace 17 años
padre
commit
a653b4e2d6
Se han modificado 2 ficheros con 4 adiciones y 3 borrados
  1. 1 3
      src/char_sql/char.c
  2. 3 0
      src/char_sql/int_quest.c

+ 1 - 3
src/char_sql/char.c

@@ -426,7 +426,7 @@ static void* create_charstatus(DBKey key, va_list args)
 
 int mmo_char_tosql(int char_id, struct mmo_charstatus* p)
 {
-	int i = 0, j;
+	int i = 0;
 	int count = 0;
 	int diff = 0;
 	char save_status[128]; //For displaying save information. [Skotlex]
@@ -910,8 +910,6 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything
 	struct item tmp_item;
 	struct skill tmp_skill;
 	struct s_friend tmp_friend;
-	struct quest tmp_quest;
-	struct quest_objective tmp_quest_obj;
 #ifdef HOTKEY_SAVING
 	struct hotkey tmp_hotkey;
 	int hotkey_num;

+ 3 - 0
src/char_sql/int_quest.c

@@ -33,6 +33,9 @@ int mapif_quests_fromsql(int char_id, struct quest questlog[])
 		return 0;
 	}
 
+	memset(&tmp_quest, 0, sizeof(struct quest));
+	memset(&tmp_quest_objective, 0, sizeof(struct quest_objective));
+
 	if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `quest_id`, `state` FROM `%s` WHERE `char_id`=? LIMIT %d", quest_db, MAX_QUEST)
 	||	SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0)
 	||	SQL_ERROR == SqlStmt_Execute(stmt)