From 721265e0fe2bd38bafd3a09a0e574e10c89bd345 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Sun, 3 Apr 2011 21:37:59 -0700 Subject: Fix some more compiler warnings --- src/map/itemdb.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/map/itemdb.c') diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 6557d43..f89446b 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -38,7 +38,7 @@ static int blue_box_default = 0, violet_box_default = 0, card_album_default = static void itemdb_read (void); static int itemdb_readdb (void); -static int itemdb_read_randomitem (); +static int itemdb_read_randomitem (void); static int itemdb_read_itemavail (void); static int itemdb_read_itemnametable (void); static int itemdb_read_noequip (void); @@ -143,7 +143,7 @@ int itemdb_searchrandomid (int flags) */ struct item_data *itemdb_exists (int nameid) { - return numdb_search (item_db, nameid); + return (struct item_data *)numdb_search (item_db, nameid); } /*========================================== @@ -152,9 +152,7 @@ struct item_data *itemdb_exists (int nameid) */ struct item_data *itemdb_search (int nameid) { - struct item_data *id; - - id = numdb_search (item_db, nameid); + struct item_data *id = (struct item_data *)numdb_search (item_db, nameid); if (id) return id; @@ -263,7 +261,7 @@ static int itemdb_read_itemslottable (void) char *buf, *p; int s; - buf = grfio_reads ("data\\itemslottable.txt", &s); + buf = (char *)grfio_reads ("data\\itemslottable.txt", &s); if (buf == NULL) return -1; buf[s] = 0; @@ -397,7 +395,7 @@ static int itemdb_readdb (void) * ランダムアイテム出現データの読み込み *------------------------------------------ */ -static int itemdb_read_randomitem () +static int itemdb_read_randomitem (void) { FILE *fp; char line[1024]; @@ -546,7 +544,7 @@ static int itemdb_read_itemnametable (void) char *buf, *p; int s; - buf = grfio_reads ("data\\idnum2itemdisplaynametable.txt", &s); + buf = (char *)grfio_reads ("data\\idnum2itemdisplaynametable.txt", &s); if (buf == NULL) return -1; @@ -592,7 +590,7 @@ static int itemdb_read_cardillustnametable (void) char *buf, *p; int s; - buf = grfio_reads ("data\\num2cardillustnametable.txt", &s); + buf = (char *)grfio_reads ("data\\num2cardillustnametable.txt", &s); if (buf == NULL) return -1; @@ -676,7 +674,7 @@ static void itemdb_final (db_key_t key, db_val_t data, va_list ap) { struct item_data *id; - nullpo_retv (id = data); + nullpo_retv (id = (struct item_data *)data); if (id->use_script) free (id->use_script); -- cgit v1.2.3-70-g09d2