Fix latent bug in msp430-tdep.c
-Wshadow=local found this latent bug. msp430-tdep.c does:
const gdb_byte *arg_bits;
{
/* Aggregates of any size are passed by reference. */
gdb_byte struct_addr[4];
[...
arg_bits = struct_addr;
}
... use arg_bits
Here, arg_bits can point to an object that's gone out of scope.
The fix is to hoist the inner "struct_addr" buffer to an outer scope,
and rename it to avoid shadowing.
gdb/ChangeLog
2018-10-04 Tom Tromey <tom@tromey.com>
* msp430-tdep.c (msp430_push_dummy_call): Rename inner
"structs_addr" and hoist declaration.