Changeset - r8984:b9a96c1e0b58
[Not reviewed]
master
0 2 0
smatz - 16 years ago 2008-04-18 21:38:36
smatz@openttd.org
(svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions
2 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/core/alloc_func.cpp
Show inline comments
 
@@ -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);
 
}
src/core/alloc_func.hpp
Show inline comments
 
@@ -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
0 comments (0 inline, 0 general)