mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 17:37:35 +00:00
Kernel: Suppress maybe-uninitialized' warning s_syscall_table in gcc-10.3.0
This commit is contained in:
parent
8d70bead20
commit
a973b22359
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
dbgln("Null syscall {} requested, you probably need to rebuild this program!", function);
|
||||||
return ENOSYS;
|
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);
|
return (process.*(s_syscall_table[function]))(arg1, arg2, arg3);
|
||||||
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue