Browse Source

src/datawizard/memalloc.c: _starpu_get_global_mem_size(): Replace STARPU_ASSERT(0) by STARPU_ABORT().

[scan-build] Garbage return value.

Here, we want to call STARPU_ABORT() rather than STARPU_ASSERT(0), since we know
we have to crash: the program almost certainly stopped making sense.  This is a
problem when compiling with --enable-fast, which disables asserts.  Calling
STARPU_ASSERT(0) would allow _starpu_get_global_mem_size() to return a garbage
value to the caller.
Cyril Roelandt 13 years ago
parent
commit
3b9e922cbe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/datawizard/memalloc.c

+ 1 - 1
src/datawizard/memalloc.c

@@ -732,7 +732,7 @@ static size_t _starpu_get_global_mem_size(int dst_node)
 		}
 #endif
 		default:
-			STARPU_ASSERT(0);
+			STARPU_ABORT();
 	}
 	return global_mem_size;
 }