diff options
author | smatz <smatz@openttd.org> | 2008-04-18 21:38:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-04-18 21:38:36 +0000 |
commit | 6813a17d15c511c0c1c3800688d6bea3632f8dda (patch) | |
tree | 0832b2ec9f340a6490911957f49c46b64180be4f /src | |
parent | 3fe8c58257c809ba5b4aefaf1327fc3a4a8a3e2b (diff) | |
download | openttd-6813a17d15c511c0c1c3800688d6bea3632f8dda.tar.xz |
(svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions
Diffstat (limited to 'src')
-rw-r--r-- | src/core/alloc_func.cpp | 4 | ||||
-rw-r--r-- | src/core/alloc_func.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/alloc_func.cpp b/src/core/alloc_func.cpp index 930482aa7..f399aadf8 100644 --- a/src/core/alloc_func.cpp +++ b/src/core/alloc_func.cpp @@ -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 @@ void MallocError(size_t size) * 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); } diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp index 2a31f8637..d5e90832e 100644 --- a/src/core/alloc_func.hpp +++ b/src/core/alloc_func.hpp @@ -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 |