From fdf1d34fdc53bb28625669ead2b812f6dcb47337 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Sat, 18 May 2013 18:17:38 -0300 Subject: Some type conversion warnings fixed. If this breaks anything create a bug report ASAP and I will revert it gladly. Signed-off-by: Matheus Macabu --- src/common/malloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/malloc.c') diff --git a/src/common/malloc.c b/src/common/malloc.c index 4874aa0f4..592027f56 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -250,7 +250,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) p->unit_head.block = NULL; p->unit_head.size = 0; p->unit_head.file = file; - p->unit_head.line = line; + p->unit_head.line = (unsigned short)line; p->prev = NULL; if (unit_head_large_first == NULL) p->next = NULL; @@ -324,7 +324,7 @@ void* _mmalloc(size_t size, const char *file, int line, const char *func ) head->block = block; head->file = file; - head->line = line; + head->line = (unsigned short)line; head->size = (unsigned short)size; *(long*)((char*)head + sizeof(struct unit_head) - sizeof(long) + size) = 0xdeadbeaf; return (char *)head + sizeof(struct unit_head) - sizeof(long); @@ -422,7 +422,7 @@ void _mfree(void *ptr, const char *file, int line, const char *func ) #ifdef DEBUG_MEMMGR memset(ptr, 0xfd, block->unit_size - sizeof(struct unit_head) + sizeof(long) ); head->file = file; - head->line = line; + head->line = (unsigned short)line; #endif memmgr_assert( block->unit_used > 0 ); if(--block->unit_used == 0) { -- cgit v1.2.3-60-g2f50