From: José Fonseca Date: Wed, 7 Jan 2015 14:27:12 +0000 (+0000) Subject: mesa: Address `assignment makes integer from pointer without a cast` gcc warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0dba2af2fbea78a937a4402f711dc4cea5189966;p=mesa.git mesa: Address `assignment makes integer from pointer without a cast` gcc warning. Reviewed-by: Brian Paul Reviewed-by: Matt Turner --- diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c index 6945c2f621b..4f5a2d11fa9 100644 --- a/src/mesa/main/imports.c +++ b/src/mesa/main/imports.c @@ -94,7 +94,7 @@ _mesa_align_malloc(size_t bytes, unsigned long alignment) ASSERT( alignment > 0 ); - ptr = malloc(bytes + alignment + sizeof(void *)); + ptr = (uintptr_t)malloc(bytes + alignment + sizeof(void *)); if (!ptr) return NULL; @@ -143,7 +143,7 @@ _mesa_align_calloc(size_t bytes, unsigned long alignment) ASSERT( alignment > 0 ); - ptr = calloc(1, bytes + alignment + sizeof(void *)); + ptr = (uintptr_t)calloc(1, bytes + alignment + sizeof(void *)); if (!ptr) return NULL;