syscall: Avoid a compiler warning which turns into a bug.
authorNathan Binkert <nate@binkert.org>
Mon, 4 Aug 2008 01:19:53 +0000 (18:19 -0700)
committerNathan Binkert <nate@binkert.org>
Mon, 4 Aug 2008 01:19:53 +0000 (18:19 -0700)
Simply cast the result to an int and life is good.

src/sim/syscall_emul.cc

index 3a0db10163f058bb8a54905682f0322eff8de1fe..3f6c56b5f0ad6dfcf9a276062abfde74df5cbe60 100644 (file)
@@ -385,7 +385,7 @@ umaskFunc(SyscallDesc *desc, int num, LiveProcess *process, ThreadContext *tc)
     // changing anything.
     mode_t oldMask = umask(0);
     umask(oldMask);
-    return oldMask;
+    return (int)oldMask;
 }
 
 SyscallReturn