mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
sim/rx: move some variable declarations to the start of the block
For sim code variables still need to be declared at the start of the enclosing block. This silences a few GCC warnings. sim/rx/ChangeLog: * syscalls.c (rx_syscall): Move declaration of some variables to the start of the enclosing block. * trace.c (load_file_and_line): Likewise.
This commit is contained in:
@ -160,6 +160,7 @@ rx_syscall (int id)
|
||||
|
||||
case SYS_open:
|
||||
{
|
||||
int oflags, cflags;
|
||||
int path = arg ();
|
||||
/* The open function is defined as taking a variable number of arguments
|
||||
because the third parameter to it is optional:
|
||||
@ -167,8 +168,8 @@ rx_syscall (int id)
|
||||
Hence the oflags and cflags arguments will be on the stack and we need
|
||||
to skip the (empty) argument registers r3 and r4. */
|
||||
argp = 4;
|
||||
int oflags = arg ();
|
||||
int cflags = arg ();
|
||||
oflags = arg ();
|
||||
cflags = arg ();
|
||||
|
||||
read_target (buf, path, 256, 1);
|
||||
if (trace)
|
||||
|
Reference in New Issue
Block a user