From 9ccffda10cdb8584198a305bcc16604a0bf28aca Mon Sep 17 00:00:00 2001 From: kderme Date: Tue, 10 Mar 2020 11:27:36 +0200 Subject: [PATCH] Fix windows warnings --- .../src-win32/Ouroboros/Consensus/Storage/IO.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ouroboros-consensus/src-win32/Ouroboros/Consensus/Storage/IO.hs b/ouroboros-consensus/src-win32/Ouroboros/Consensus/Storage/IO.hs index 68e2fab44dc..fb3a531faa1 100644 --- a/ouroboros-consensus/src-win32/Ouroboros/Consensus/Storage/IO.hs +++ b/ouroboros-consensus/src-win32/Ouroboros/Consensus/Storage/IO.hs @@ -62,7 +62,7 @@ write fh data' bytes = withOpenHandle "write" fh $ \h -> seek :: FHandle -> SeekMode -> Int64 -> IO () seek fh seekMode size = void <$> withOpenHandle "seek" fh $ \h -> - setFilePointerEx h (fromIntegral size) (fromSeekMode seekMode) + setFilePointerEx h size (fromSeekMode seekMode) fromSeekMode :: SeekMode -> FilePtrDirection fromSeekMode AbsoluteSeek = fILE_BEGIN @@ -97,8 +97,8 @@ close :: FHandle -> IO () close fh = closeHandleOS fh closeHandle getSize :: FHandle -> IO Word64 -getSize fh = withOpenHandle "getSize" fh $ \h -> do - fromIntegral . bhfiSize <$> getFileInformationByHandle h +getSize fh = withOpenHandle "getSize" fh $ \h -> + bhfiSize <$> getFileInformationByHandle h -- | For the following error types, our mock FS implementation (and the Posix -- implementation) throw the same errors: