aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Unistd.hsc
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2008-08-21 12:01:38 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2008-08-21 12:01:38 +0000
commit7f033077b8b0c618c3c1cad5a40898c2837a8969 (patch)
tree1d83a75fb9120fca119701b37a02e3130a8250e3 /System/Posix/Unistd.hsc
parentc1180fec9f1121323b519ea86fd730b29f1b2f6d (diff)
Fix warnings in the unix package
Diffstat (limited to 'System/Posix/Unistd.hsc')
-rw-r--r--System/Posix/Unistd.hsc11
1 files changed, 6 insertions, 5 deletions
diff --git a/System/Posix/Unistd.hsc b/System/Posix/Unistd.hsc
index cb6e35d..13d3c65 100644
--- a/System/Posix/Unistd.hsc
+++ b/System/Posix/Unistd.hsc
@@ -1,4 +1,5 @@
{-# LANGUAGE ForeignFunctionInterface #-}
+{-# OPTIONS_GHC -fno-warn-unused-imports -fno-warn-unused-binds #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Posix.Unistd
@@ -138,7 +139,7 @@ nanosleep 0 = return ()
nanosleep nsecs = do
allocaBytes (#const sizeof(struct timespec)) $ \pts1 -> do
allocaBytes (#const sizeof(struct timespec)) $ \pts2 -> do
- let (tv_sec,tv_nsec) = nsecs `divMod` 1000000000
+ let (tv_sec0, tv_nsec0) = nsecs `divMod` 1000000000
let
loop tv_sec tv_nsec = do
(#poke struct timespec, tv_sec) pts1 tv_sec
@@ -149,11 +150,11 @@ nanosleep nsecs = do
else do errno <- getErrno
if errno == eINTR
then do
- tv_sec <- (#peek struct timespec, tv_sec) pts2
- tv_nsec <- (#peek struct timespec, tv_nsec) pts2
- loop tv_sec tv_nsec
+ tv_sec' <- (#peek struct timespec, tv_sec) pts2
+ tv_nsec' <- (#peek struct timespec, tv_nsec) pts2
+ loop tv_sec' tv_nsec'
else throwErrno "nanosleep"
- loop (fromIntegral tv_sec :: CTime) (fromIntegral tv_nsec :: CTime)
+ loop (fromIntegral tv_sec0 :: CTime) (fromIntegral tv_nsec0 :: CTime)
newtype CTimeSpec = CTimeSpec CTimeSpec