diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-11 17:51:19 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-04-11 17:51:19 +0200 |
| commit | c3856eddb5a8146751dac82ad1ba4433f5ca6d6d (patch) | |
| tree | a74bdf6f87d07a24496effbc157f74d379d25007 /dev/kernel/src/CxxAbi-AMD64.cc | |
| parent | 9da6a352ecf70a1f5be99058a880b20db1b57940 (diff) | |
tweak kernel, boot: use -Wall, -Werror, -Wpedantic now.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/CxxAbi-AMD64.cc')
| -rw-r--r-- | dev/kernel/src/CxxAbi-AMD64.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/dev/kernel/src/CxxAbi-AMD64.cc b/dev/kernel/src/CxxAbi-AMD64.cc index 9270d612..6bf5d009 100644 --- a/dev/kernel/src/CxxAbi-AMD64.cc +++ b/dev/kernel/src/CxxAbi-AMD64.cc @@ -19,24 +19,22 @@ Kernel::UIntPtr __dso_handle; EXTERN_C Kernel::Void __cxa_pure_virtual(void* self) { - kout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self)); - kout << ", has unimplemented virtual functions.\r"; + (void)(Kernel::kout << "object: " << Kernel::number(reinterpret_cast<Kernel::UIntPtr>(self))); + (void)(Kernel::kout << ", has unimplemented virtual functions.\r"); } EXTERN_C void ___chkstk_ms(void) { - kout << "Stack smashing detected!\r"; + (void)(Kernel::kout << "Stack smashing detected!\r"); dbg_break_point(); } -EXTERN_C int atexit(void (*f)(void*), void* arg, void* dso) +EXTERN_C int atexit(void (*f)()) { if (__atexit_func_count >= kAtExitMacDestructors) return 1; __atexit_funcs[__atexit_func_count].destructor_func = f; - __atexit_funcs[__atexit_func_count].obj_ptr = arg; - __atexit_funcs[__atexit_func_count].dso_handle = dso; __atexit_func_count++; @@ -52,7 +50,7 @@ EXTERN_C void __cxa_finalize(void* f) { if (__atexit_funcs[i].destructor_func) { - (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr); + (*__atexit_funcs[i].destructor_func)(); }; } @@ -63,7 +61,7 @@ EXTERN_C void __cxa_finalize(void* f) { if (__atexit_funcs[i].destructor_func) { - (*__atexit_funcs[i].destructor_func)(__atexit_funcs[i].obj_ptr); + (*__atexit_funcs[i].destructor_func)(); __atexit_funcs[i].destructor_func = 0; }; } |
