Turn atomic_ops_malloc static mmap-related empty functions into macro
authorIvan Maidanski <ivmai@mail.ru>
Wed, 21 Sep 2011 09:02:40 +0000 (13:02 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 21 Sep 2011 09:02:40 +0000 (13:02 +0400)
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

index fc375e4..849896b 100644 (file)
@@ -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 */