Author: philip Date: Wed May 11 12:52:47 2011 New Revision: 1101863 URL: http://svn.apache.org/viewvc?rev=1101863&view=rev Log: Get rid of GCC warning about casting void* to an integer type.
* subversion/libsvn_subr/cache-membuffer.c (ALIGN_POINTER): Include a (char*) cast and brackets round the parameter. (secure_aligned_alloc): Use void* for variable, remove noop cast. Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Modified: subversion/trunk/subversion/libsvn_subr/cache-membuffer.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/cache-membuffer.c?rev=1101863&r1=1101862&r2=1101863&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_subr/cache-membuffer.c (original) +++ subversion/trunk/subversion/libsvn_subr/cache-membuffer.c Wed May 11 12:52:47 2011 @@ -422,7 +422,7 @@ struct svn_membuffer_t /* Align POINTER value to the next ITEM_ALIGNMENT boundary. */ -#define ALIGN_POINTER(pointer) ((void*)ALIGN_VALUE((apr_size_t)pointer)) +#define ALIGN_POINTER(pointer) ((void*)ALIGN_VALUE((apr_size_t)(char*)(pointer))) /* Acquire the cache mutex, if necessary. */ @@ -878,7 +878,7 @@ static void* secure_aligned_alloc(apr_po apr_size_t size, svn_boolean_t zero) { - char* memory = apr_palloc(pool, (apr_size_t)size + ITEM_ALIGNMENT); + void* memory = apr_palloc(pool, size + ITEM_ALIGNMENT); if (memory != NULL) { memory = (char *)ALIGN_POINTER(memory);