[commit: unix] master: Fix warnings. (868c6df)

Paolo Capriotti <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.libraries
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/packages/unix

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/868c6df0de51011eabe9d07129436b4601744a35

>---------------------------------------------------------------

commit 868c6df0de51011eabe9d07129436b4601744a35
Author: Paolo Capriotti <[email protected]>
Date:   Wed Jul 18 11:51:26 2012 +0100

    Fix warnings.

>---------------------------------------------------------------

 System/Posix/Files/Common.hsc |   72 ++++++++++++++++++++--------------------
 1 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/System/Posix/Files/Common.hsc b/System/Posix/Files/Common.hsc
index 01f9fb3..cdbd07f 100644
--- a/System/Posix/Files/Common.hsc
+++ b/System/Posix/Files/Common.hsc
@@ -271,69 +271,69 @@ statusChangeTime (FileStatus stat) =
   unsafePerformIO $ withForeignPtr stat $ (#peek struct stat, st_ctime)
 
 accessTimeHiRes (FileStatus stat) =
-  unsafePerformIO $ withForeignPtr stat $ \stat -> do
-    sec  <- (#peek struct stat, st_atime) stat :: IO EpochTime
+  unsafePerformIO $ withForeignPtr stat $ \stat_ptr -> do
+    sec  <- (#peek struct stat, st_atime) stat_ptr :: IO EpochTime
 #ifdef HAVE_STRUCT_STAT_ST_ATIM
-    nsec <- (#peek struct stat, st_atim.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_atim.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_ATIMESPEC
-    nsec <- (#peek struct stat, st_atimespec.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_atimespec.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_ATIMENSEC
-    nsec <- (#peek struct stat, st_atimensec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_atimensec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_ATIME_N
-    nsec <- (#peek struct stat, st_atime_n) stat :: IO (#type int)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_atime_n) stat_ptr :: IO (#type int)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_UATIME
-    usec <- (#peek struct stat, st_uatime) stat :: IO (#type int)
-    let frac = toInteger usec % 10^6
+    usec <- (#peek struct stat, st_uatime) stat_ptr :: IO (#type int)
+    let frac = toInteger usec % 10^(6::Int)
 #else
     let frac = 0
 #endif
     return $ fromRational $ toRational sec + frac
 
 modificationTimeHiRes (FileStatus stat) =
-  unsafePerformIO $ withForeignPtr stat $ \stat -> do
-    sec  <- (#peek struct stat, st_mtime) stat :: IO EpochTime
+  unsafePerformIO $ withForeignPtr stat $ \stat_ptr -> do
+    sec  <- (#peek struct stat, st_mtime) stat_ptr :: IO EpochTime
 #ifdef HAVE_STRUCT_STAT_ST_MTIM
-    nsec <- (#peek struct stat, st_mtim.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_mtim.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_MTIMESPEC
-    nsec <- (#peek struct stat, st_mtimespec.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_mtimespec.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_MTIMENSEC
-    nsec <- (#peek struct stat, st_mtimensec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_mtimensec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_MTIME_N
-    nsec <- (#peek struct stat, st_mtime_n) stat :: IO (#type int)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_mtime_n) stat_ptr :: IO (#type int)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_UMTIME
-    usec <- (#peek struct stat, st_umtime) stat :: IO (#type int)
-    let frac = toInteger usec % 10^6
+    usec <- (#peek struct stat, st_umtime) stat_ptr :: IO (#type int)
+    let frac = toInteger usec % 10^(6::Int)
 #else
     let frac = 0
 #endif
     return $ fromRational $ toRational sec + frac
 
 statusChangeTimeHiRes (FileStatus stat) =
-  unsafePerformIO $ withForeignPtr stat $ \stat -> do
-    sec  <- (#peek struct stat, st_ctime) stat :: IO EpochTime
+  unsafePerformIO $ withForeignPtr stat $ \stat_ptr -> do
+    sec  <- (#peek struct stat, st_ctime) stat_ptr :: IO EpochTime
 #ifdef HAVE_STRUCT_STAT_ST_CTIM
-    nsec <- (#peek struct stat, st_ctim.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_ctim.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_CTIMESPEC
-    nsec <- (#peek struct stat, st_ctimespec.tv_nsec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_ctimespec.tv_nsec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_CTIMENSEC
-    nsec <- (#peek struct stat, st_ctimensec) stat :: IO (#type long)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_ctimensec) stat_ptr :: IO (#type long)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_CTIME_N
-    nsec <- (#peek struct stat, st_ctime_n) stat :: IO (#type int)
-    let frac = toInteger nsec % 10^9
+    nsec <- (#peek struct stat, st_ctime_n) stat_ptr :: IO (#type int)
+    let frac = toInteger nsec % 10^(9::Int)
 #elif HAVE_STRUCT_STAT_ST_UCTIME
-    usec <- (#peek struct stat, st_uctime) stat :: IO (#type int)
-    let frac = toInteger usec % 10^6
+    usec <- (#peek struct stat, st_uctime) stat_ptr :: IO (#type int)
+    let frac = toInteger usec % 10^(6::Int)
 #else
     let frac = 0
 #endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.