diff options
| author | Peter Maydell | 2011-02-01 16:54:52 +0100 |
|---|---|---|
| committer | Blue Swirl | 2011-02-01 18:03:02 +0100 |
| commit | e321c34aa1d2560bea4d525af66417147467c515 (patch) | |
| tree | 636dc1c4c98d4bda5447b9326bb04d7997622515 /linux-user | |
| parent | hw/slavio_intctl.c: fix gcc warning about array bounds overrun (diff) | |
| download | qemu-e321c34aa1d2560bea4d525af66417147467c515.tar.gz qemu-e321c34aa1d2560bea4d525af66417147467c515.tar.xz qemu-e321c34aa1d2560bea4d525af66417147467c515.zip | |
linux-user: avoid gcc array overrun warning for sparc
Suppress a gcc array bounds overrun warning when filling in the SPARC
signal frame by adjusting our definition of the structure so that the
fp and callers_pc membes are part of the ins[] array rather than
separate fields; since qemu has no need to access the fields individually
there is no need to follow the kernel's structure field naming exactly.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'linux-user')
| -rw-r--r-- | linux-user/signal.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 0664770c94..b01bd64011 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -1817,9 +1817,10 @@ struct target_sigcontext { /* A Sparc stack frame */ struct sparc_stackf { abi_ulong locals[8]; - abi_ulong ins[6]; - struct sparc_stackf *fp; - abi_ulong callers_pc; + abi_ulong ins[8]; + /* It's simpler to treat fp and callers_pc as elements of ins[] + * since we never need to access them ourselves. + */ char *structptr; abi_ulong xargs[6]; abi_ulong xxargs[1]; |
