فهرست منبع

* Corrected a few Compiling Warnings [Codemaster]

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5405 54d463be-8e91-2dee-dedb-b68131a5f0ec
codemaster 19 سال پیش
والد
کامیت
e2b51026b8
6فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/char_sql/char.c
  3. 1 1
      src/char_sql/int_guild.c
  4. 1 1
      src/char_sql/int_party.c
  5. 1 1
      src/char_sql/int_pet.c
  6. 1 1
      src/login_sql/login.c

+ 1 - 0
Changelog-Trunk.txt

@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.  EV
 GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
 
 2006/03/01
+	* Corrected a few Compiling Warnings [Codemaster]
 	* Added the ability to select GM loading via Login (default) or Char [Codemaster]
 2006/02/28
 	* Rewrote LAN support code. Changed configuration file name

+ 2 - 2
src/char_sql/char.c

@@ -346,7 +346,7 @@ void read_gm_account(void) {
 		}
 		lsql_res = mysql_store_result(&lmysql_handle);
 		if (lsql_res) {
-			gm_account = (struct gm_account*)aCalloc(sizeof(struct gm_account) * mysql_num_rows(lsql_res), 1);
+			gm_account = (struct gm_account*)aCalloc(sizeof(struct gm_account) * (size_t)mysql_num_rows(lsql_res), 1);
 			while ((lsql_row = mysql_fetch_row(lsql_res))) {
 				gm_account[GM_num].account_id = atoi(lsql_row[0]);
 				gm_account[GM_num].level = atoi(lsql_row[1]);
@@ -1417,7 +1417,7 @@ int make_new_char_sql(int fd, unsigned char *dat) {
 	//Now we need the charid from sql!
 	if(mysql_field_count(&mysql_handle) == 0 &&
 		mysql_insert_id(&mysql_handle) > 0)
-		char_id = mysql_insert_id(&mysql_handle);
+		char_id = (int)mysql_insert_id(&mysql_handle);
 	else {
 		//delete the char ..(no trash in DB!) but how is this possible?
 		sprintf(tmp_sql, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_num` = '%d' AND `name` = '%s'", char_db, sd->account_id, dat[30], t_name);

+ 1 - 1
src/char_sql/int_guild.c

@@ -157,7 +157,7 @@ int inter_guild_tosql(struct guild *g,int flag)
 		} else if (g->guild_id == -1) { //New guild
 			if(mysql_field_count(&mysql_handle) == 0 &&
 				mysql_insert_id(&mysql_handle) != 0)
-				g->guild_id = mysql_insert_id(&mysql_handle);
+				g->guild_id = (int)mysql_insert_id(&mysql_handle);
 			else
 				return 0; //Failed to get ID??
 		}

+ 1 - 1
src/char_sql/int_party.c

@@ -89,7 +89,7 @@ int inter_party_tosql(struct party *p, int flag, int index)
 		}
 		if(mysql_field_count(&mysql_handle) == 0 &&
 			mysql_insert_id(&mysql_handle) != 0)
-			party_id = p->party_id = mysql_insert_id(&mysql_handle);
+			party_id = p->party_id = (int)mysql_insert_id(&mysql_handle);
 		else { //Failed to retrieve ID??
 			aFree(p); //Free party, couldn't create it.
 			return 0;

+ 1 - 1
src/char_sql/int_pet.c

@@ -57,7 +57,7 @@ int inter_pet_tosql(int pet_id, struct s_pet *p) {
 	} else if (pet_id == -1) { //New pet inserted.
 		if(mysql_field_count(&mysql_handle) == 0 &&
 			mysql_insert_id(&mysql_handle) != 0) {
-			p->pet_id = pet_id = mysql_insert_id(&mysql_handle);
+			p->pet_id = pet_id = (int)mysql_insert_id(&mysql_handle);
 		} else {
 			ShowError("inter_pet_tosql: Failed to retrieve new pet_id for '%s'. Pet creation aborted.\n", p->name);
 			return 0;

+ 1 - 1
src/login_sql/login.c

@@ -499,7 +499,7 @@ int mmo_auth_new(struct mmo_account* account, char sex)
 	if(mysql_field_count(&mysql_handle) == 0 &&
 		mysql_insert_id(&mysql_handle) < START_ACCOUNT_NUM) {
 		//Invalid Account ID! Must update it.
-		int id = mysql_insert_id(&mysql_handle);
+		int id = (int)mysql_insert_id(&mysql_handle);
 		sprintf(tmp_sql, "UPDATE `%s` SET `%s`='%d' WHERE `%s`='%d'", login_db, login_db_account_id, START_ACCOUNT_NUM, login_db_account_id, id);
 		if(mysql_query(&mysql_handle, tmp_sql)){
 			ShowError("New account %s has an invalid account ID [%d] which could not be updated (account_id must be %d or higher).", account->userid, id, START_ACCOUNT_NUM);