syscall emulation: fix fast build issue
authorSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 19 Jul 2014 09:06:22 +0000 (02:06 -0700)
committerSteve Reinhardt <steve.reinhardt@amd.com>
Sat, 19 Jul 2014 09:06:22 +0000 (02:06 -0700)
Surprisingly gcc will complain about unused variables even
inside an 'if (false)' block.

I thought I had tested this previously, but apparently not.

src/sim/syscall_emul.cc

index ff22aea543a32f10620c4eb0b28c5d6846a7e91f..fa18b910f8007d8fc2d490a00e6a38e37de54940 100644 (file)
@@ -57,7 +57,7 @@ SyscallDesc::doSyscall(int callnum, LiveProcess *process, ThreadContext *tc)
 {
     if (DTRACE(SyscallVerbose)) {
         int index = 0;
-        IntReg arg[4];
+        IntReg arg[4] M5_VAR_USED;
 
         // we can't just put the calls to getSyscallArg() in the
         // DPRINTF arg list, because C++ doesn't guarantee their order