diff options
author | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-04-12 11:54:14 -0700 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-14 21:49:54 +0200 |
commit | a973b22359119ee46c8a2e21761147708c03005a (patch) | |
tree | efce2e22d7a5d1d0c208a3e6d9f1917958f0b430 /Kernel/Syscall.cpp | |
parent | 8d70bead20d7ee968bd503e082013488acd509e5 (diff) | |
download | serenity-a973b22359119ee46c8a2e21761147708c03005a.zip |
Kernel: Suppress maybe-uninitialized' warning s_syscall_table in gcc-10.3.0
Diffstat (limited to 'Kernel/Syscall.cpp')
-rw-r--r-- | Kernel/Syscall.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp index fc1fe89238..fc15c2f677 100644 --- a/Kernel/Syscall.cpp +++ b/Kernel/Syscall.cpp @@ -138,7 +138,16 @@ KResultOr<FlatPtr> handle(RegisterState& regs, FlatPtr function, FlatPtr arg1, F dbgln("Null syscall {} requested, you probably need to rebuild this program!", function); return ENOSYS; } + + // This appears to be a bogus warning, as s_syscall_table is always + // initialized, and the index (function) is always bounded. + // TODO: Figure out how to avoid the suppression. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" + return (process.*(s_syscall_table[function]))(arg1, arg2, arg3); + +#pragma GCC diagnostic pop } } |