disable warning when -DNDEBUG(disable assert())
authorLai Jiangshan <laijs@cn.fujitsu.com>
Fri, 2 Dec 2011 13:05:08 +0000 (08:05 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 2 Dec 2011 13:05:08 +0000 (08:05 -0500)
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
rculfhash-mm-mmap.c

index e2c565e67fee5b48654f9eb12b72aa6f41ec8c44..dba4524de7d3c42814342258e34b266df2b3dcd6 100644 (file)
@@ -36,14 +36,18 @@ static void *memory_map(size_t length)
 
 static void memory_unmap(void *ptr, size_t length)
 {
-       int ret = munmap(ptr, length);
+       int ret __attribute__((unused));
+
+       ret = munmap(ptr, length);
 
        assert(ret == 0);
 }
 
 static void memory_populate(void *ptr, size_t length)
 {
-       void *ret = mmap(ptr, length, PROT_READ | PROT_WRITE,
+       void *ret __attribute__((unused));
+
+       ret = mmap(ptr, length, PROT_READ | PROT_WRITE,
                        MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 
        assert(ret == ptr);
@@ -55,7 +59,9 @@ static void memory_populate(void *ptr, size_t length)
  */
 static void memory_discard(void *ptr, size_t length)
 {
-       void *ret = mmap(ptr, length, PROT_NONE,
+       void *ret __attribute__((unused));
+
+       ret = mmap(ptr, length, PROT_NONE,
                        MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
 
        assert(ret == ptr);
This page took 0.025917 seconds and 4 git commands to generate.