summaryrefslogtreecommitdiff
path: root/src/common/ers.c
diff options
context:
space:
mode:
authorgreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-05 11:17:26 +0000
committergreenboxal2 <greenboxal2@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-05 11:17:26 +0000
commit2f7c1cad534e6e2ee079546437bee2bf172dafe5 (patch)
tree0620b9fae72d8a626be8149fb3b4f80cfe9f03c1 /src/common/ers.c
parent4e6774e4173eccff9d0b51b45fe2af07e682e67d (diff)
downloadhercules-2f7c1cad534e6e2ee079546437bee2bf172dafe5.tar.gz
hercules-2f7c1cad534e6e2ee079546437bee2bf172dafe5.tar.bz2
hercules-2f7c1cad534e6e2ee079546437bee2bf172dafe5.tar.xz
hercules-2f7c1cad534e6e2ee079546437bee2bf172dafe5.zip
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
Diffstat (limited to 'src/common/ers.c')
-rw-r--r--src/common/ers.c5
1 files 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)
{