diff options
author | Keith Whitwell <keithw@vmware.com> | 2009-08-13 14:26:50 +0100 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2009-08-13 14:26:50 +0100 |
commit | 120e76866b4b0d136ae4ed377c6ff96454e39b95 (patch) | |
tree | b54bfd9e684a570cfc446c68e7ae294a94535b27 /src/gallium | |
parent | b1d82f1f19b9556e9f4491f60b6ef17d7f0b471d (diff) |
util: silence warnings for third REALLOC argument
Our fallback realloc path requires an old_size argument, but the posix
varient doesn't need this. Add some code to avoid gcc unused variable
warnings for this extra argument.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_memory.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_memory.h b/src/gallium/auxiliary/util/u_memory.h index 0b18d043ad..c3f8c91833 100644 --- a/src/gallium/auxiliary/util/u_memory.h +++ b/src/gallium/auxiliary/util/u_memory.h @@ -100,8 +100,14 @@ ExFreePool(void *P); #define MALLOC( SIZE ) malloc( SIZE ) #define CALLOC( COUNT, SIZE ) calloc( COUNT, SIZE ) #define FREE( PTR ) free( PTR ) -#define REALLOC( OLDPTR, OLDSIZE, NEWSIZE ) realloc( OLDPTR, NEWSIZE ) +static INLINE void * +_REALLOC( void *old_ptr, unsigned old_size, unsigned new_size ) +{ + (void) old_size; + return realloc(old_ptr, new_size); +} +#define REALLOC( a, b, c ) _REALLOC( a, b, c ) #endif |