From a57f21af8336f875080b8bb73cdbff05ce72cb5d Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 21 Sep 2011 13:02:40 +0400 Subject: [PATCH] Turn atomic_ops_malloc static mmap-related empty functions into macro definitions in case of missing mmap() to eliminate a compiler warning about unused arguments. * src/atomic_ops_malloc.c (get_mmaped, AO_malloc_large, AO_free_large): Turn static empty function into macro definition; remove ARGSUSED comment-based annotation. --- src/atomic_ops_malloc.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/src/atomic_ops_malloc.c b/src/atomic_ops_malloc.c index fc375e4..849896b 100644 --- a/src/atomic_ops_malloc.c +++ b/src/atomic_ops_malloc.c @@ -163,25 +163,10 @@ AO_malloc_enable_mmap(void) { } -/*ARGSUSED*/ -static char *get_mmaped(size_t sz) -{ - return 0; -} - -/*ARGSUSED*/ -static char * -AO_malloc_large(size_t sz) -{ - return 0; -} - -/*ARGSUSED*/ -static void -AO_free_large(char * p) -{ - abort(); /* Programmer error. Not really async-signal-safe, but ... */ -} +#define get_mmaped(sz) ((char*)0) +#define AO_malloc_large(sz) ((char*)0) +#define AO_free_large(p) abort() + /* Programmer error. Not really async-signal-safe, but ... */ #endif /* No MMAP */ -- 2.50.1