mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 09:29:10 +00:00
(svn r12778) -Codechange: add the NORETURN attribute to *allocError() functions
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
* Function to exit with an error message after malloc() or calloc() have failed
|
* Function to exit with an error message after malloc() or calloc() have failed
|
||||||
* @param size number of bytes we tried to allocate
|
* @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);
|
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
|
* Function to exit with an error message after realloc() have failed
|
||||||
* @param size number of bytes we tried to allocate
|
* @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);
|
error("Out of memory. Cannot reallocate %i bytes", size);
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
* duplicated in each object file making the final
|
* duplicated in each object file making the final
|
||||||
* binary needlessly large.
|
* binary needlessly large.
|
||||||
*/
|
*/
|
||||||
void MallocError(size_t size);
|
void NORETURN MallocError(size_t size);
|
||||||
void ReallocError(size_t size);
|
void NORETURN ReallocError(size_t size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Simplified allocation function that allocates the specified number of
|
* Simplified allocation function that allocates the specified number of
|
||||||
|
Reference in New Issue
Block a user