[Git][ghc/ghc][wip/unboxed-codebuffer] Fix warnings
Josh Meredith (@JoshMeredith)
gitlab at gitlab.haskell.org
Thu Feb 16 14:05:12 UTC 2023
Josh Meredith pushed to branch wip/unboxed-codebuffer at Glasgow Haskell Compiler / GHC
Commits:
18ca5d91 by Josh Meredith at 2023-02-16T14:05:02+00:00
Fix warnings
- - - - -
2 changed files:
- libraries/base/GHC/IO/Encoding/Latin1.hs
- libraries/base/GHC/IO/Encoding/UTF32.hs
Changes:
=====================================
libraries/base/GHC/IO/Encoding/Latin1.hs
=====================================
@@ -241,7 +241,7 @@ single_byte_checked_encode max_legal_char
| otherwise = do
let !(# st1, (c,ir') #) = unIO (readCharBuf iraw ir) st0
if ord c > max_legal_char then invalid st1 else do
- let (# st2, () #) = unIO (writeWord8Buf oraw ow (fromIntegral (ord c))) st1
+ let !(# st2, () #) = unIO (writeWord8Buf oraw ow (fromIntegral (ord c))) st1
loop ir' (ow+1) st2
where
invalid :: EncodingBuffer
=====================================
libraries/base/GHC/IO/Encoding/UTF32.hs
=====================================
@@ -255,7 +255,7 @@ utf32le_decode
!(# st4, c3 #) = unIO (readWord8Buf iraw (ir+3)) st3
let x1 = chr4 c3 c2 c1 c0
if not (validate x1) then invalid st4 else do
- let (# st5, ow' #) = unIO (writeCharBuf oraw ow x1) st4
+ let !(# st5, ow' #) = unIO (writeCharBuf oraw ow x1) st4
loop (ir+4) ow' st5
where
invalid :: DecodingBuffer
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/18ca5d9109987eae376190bddef92b4719c98eb8
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/18ca5d9109987eae376190bddef92b4719c98eb8
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230216/cffd8c83/attachment-0001.html>
More information about the ghc-commits
mailing list