(svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions
authorsmatz
Fri, 18 Apr 2008 21:38:36 +0000
changeset 8984 68ef6bf69605
parent 8983 ea20f3cd2165
child 8985 6461e5c6d6e4
(svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions
src/core/alloc_func.cpp
src/core/alloc_func.hpp
--- a/src/core/alloc_func.cpp	Fri Apr 18 21:33:21 2008 +0000
+++ b/src/core/alloc_func.cpp	Fri Apr 18 21:38:36 2008 +0000
@@ -9,7 +9,7 @@
  * Function to exit with an error message after malloc() or calloc() have failed
  * @param size number of bytes we tried to allocate
  */
-void MallocError(size_t size)
+void NORETURN MallocError(size_t size)
 {
 	error("Out of memory. Cannot allocate %i bytes", size);
 }
@@ -18,7 +18,7 @@
  * Function to exit with an error message after realloc() have failed
  * @param size number of bytes we tried to allocate
  */
-void ReallocError(size_t size)
+void NORETURN ReallocError(size_t size)
 {
 	error("Out of memory. Cannot reallocate %i bytes", size);
 }
--- a/src/core/alloc_func.hpp	Fri Apr 18 21:33:21 2008 +0000
+++ b/src/core/alloc_func.hpp	Fri Apr 18 21:38:36 2008 +0000
@@ -11,8 +11,8 @@
  * duplicated in each object file making the final
  * binary needlessly large.
  */
-void MallocError(size_t size);
-void ReallocError(size_t size);
+void NORETURN MallocError(size_t size);
+void NORETURN ReallocError(size_t size);
 
 /**
  * Simplified allocation function that allocates the specified number of