diff options
author | Joe Gross <joseph.gross@amd.com> | 2018-04-18 17:59:50 -0400 |
---|---|---|
committer | Brandon Potter <Brandon.Potter@amd.com> | 2019-05-03 19:16:34 +0000 |
commit | f75351acd7d518dddd1b2205bce529232cc9d43d (patch) | |
tree | 259fc8b4e854226f196ba77b1d2bfc6374bd937a /src/sim | |
parent | d692552e9097f432740d676f8c30e7dd5011c417 (diff) | |
download | gem5-f75351acd7d518dddd1b2205bce529232cc9d43d.tar.xz |
sim-se: fix a few bugs/warns from GCC 6
Change-Id: Ib2ad860324fd234b23262d141be3e82628ff61f0
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/12126
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/syscall_emul.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index bfec1f5a5..98fbe96a0 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -848,12 +848,6 @@ SyscallReturn pipeImpl(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc, bool pseudoPipe) { - Addr tgt_addr = 0; - if (!pseudoPipe) { - int index = 0; - tgt_addr = p->getSyscallArg(tc, index); - } - int sim_fds[2], tgt_fds[2]; int pipe_retval = pipe(sim_fds); @@ -883,6 +877,9 @@ pipeImpl(SyscallDesc *desc, int callnum, Process *p, ThreadContext *tc, return tgt_fds[0]; } + int index = 0; + Addr tgt_addr = p->getSyscallArg(tc, index); + /** * Copy the target file descriptors into buffer space and then copy * the buffer space back into the target address space. |