mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
kdb_sysctl_trap: suppress gcc -Warray-bounds
gcc diagnosed a dereference of 0x10 with -Warray-bounds, which is entirely sensible, except that this is a deliberate trap. Throw gcc off with a volatile pointer. Reviewed by: kib (previous version) Differential Revision: https://reviews.freebsd.org/D45917
This commit is contained in:
parent
2207aaba89
commit
ff1c63671b
|
@ -238,7 +238,7 @@ static int
|
|||
kdb_sysctl_trap(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int error, i;
|
||||
int *addr = (int *)0x10;
|
||||
int *volatile addr = (int *)0x10;
|
||||
|
||||
error = sysctl_wire_old_buffer(req, sizeof(int));
|
||||
if (error == 0) {
|
||||
|
|
Loading…
Reference in a new issue