summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-01 05:43:41 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-01 05:43:41 +0000
commit6803e755d6805fe86345558a76f7d7b24dbbacc3 (patch)
tree3fee9f402c3a4e359d93a305a6de499405e015ab /src/char_sql
parent3a44a959e2d8f76d5a43a81992e3d17fe50644d0 (diff)
downloadhercules-6803e755d6805fe86345558a76f7d7b24dbbacc3.tar.gz
hercules-6803e755d6805fe86345558a76f7d7b24dbbacc3.tar.bz2
hercules-6803e755d6805fe86345558a76f7d7b24dbbacc3.tar.xz
hercules-6803e755d6805fe86345558a76f7d7b24dbbacc3.zip
* Corrected a few Compiling Warnings [Codemaster]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5405 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c4
-rw-r--r--src/char_sql/int_guild.c2
-rw-r--r--src/char_sql/int_party.c2
-rw-r--r--src/char_sql/int_pet.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 079cb743d..44f7e420d 100644
--- a/src/char_sql/char.c
+++ b/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);
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 9fd4453d0..b3da7ea91 100644
--- a/src/char_sql/int_guild.c
+++ b/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??
}
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index fcc11dc57..010abdc8f 100644
--- a/src/char_sql/int_party.c
+++ b/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;
diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c
index 4ae7e3fcc..15ecd4853 100644
--- a/src/char_sql/int_pet.c
+++ b/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;