mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
Kernel: Tell compiler about invisible calls
This makes the Kernel build cleanly with -Wmissing-declarations.
This commit is contained in:
parent
8a41ce5cc7
commit
936d5dcc01
3 changed files with 47 additions and 28 deletions
|
@ -282,11 +282,6 @@ char* strstr(const char* haystack, const char* needle)
|
|||
return const_cast<char*>(haystack);
|
||||
}
|
||||
|
||||
[[noreturn]] void __cxa_pure_virtual()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void* realloc(void* p, size_t s)
|
||||
{
|
||||
return krealloc(p, s);
|
||||
|
@ -297,6 +292,13 @@ void free(void* p)
|
|||
return kfree(p);
|
||||
}
|
||||
|
||||
// Functions that are automatically called by the C++ compiler.
|
||||
// Declare them first, to tell the silly compiler that they are indeed being used.
|
||||
[[noreturn]] void __stack_chk_fail();
|
||||
[[noreturn]] void __stack_chk_fail_local();
|
||||
extern "C" int __cxa_atexit(void (*)(void*), void*, void*);
|
||||
[[noreturn]] void __cxa_pure_virtual();
|
||||
|
||||
[[noreturn]] void __stack_chk_fail()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
|
@ -312,4 +314,9 @@ extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
|
|||
ASSERT_NOT_REACHED();
|
||||
return 0;
|
||||
}
|
||||
|
||||
[[noreturn]] void __cxa_pure_virtual()
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue