From 2f7c1cad534e6e2ee079546437bee2bf172dafe5 Mon Sep 17 00:00:00 2001 From: greenboxal2 Date: Wed, 5 Sep 2012 11:17:26 +0000 Subject: Fixed bugreport:6621 get rid of some warnings that probably caused the map-server to crash on x64 systems. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16747 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/ers.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/ers.c b/src/common/ers.c index 3e759c772..514f09c34 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -51,7 +51,6 @@ #define ERS_ROOT_SIZE 256 #define ERS_BLOCK_ENTRIES 4096 -typedef struct ers_instance_t; struct ers_list { struct ers_list *Next; @@ -169,7 +168,7 @@ static void *ers_obj_alloc_entry(ERS self) if (instance->Cache->ReuseList != NULL) { - ret = (void *)((unsigned int)instance->Cache->ReuseList + sizeof(struct ers_list)); + ret = (void *)((unsigned char *)instance->Cache->ReuseList + sizeof(struct ers_list)); instance->Cache->ReuseList = instance->Cache->ReuseList->Next; } else if (instance->Cache->Free > 0) @@ -200,7 +199,7 @@ static void *ers_obj_alloc_entry(ERS self) static void ers_obj_free_entry(ERS self, void *entry) { ers_instance_t *instance = (ers_instance_t *)self; - struct ers_list *reuse = (struct ers_list *)((unsigned int)entry - sizeof(struct ers_list)); + struct ers_list *reuse = (struct ers_list *)((unsigned char *)entry - sizeof(struct ers_list)); if (instance == NULL) { -- cgit v1.2.3-70-g09d2