[Git][ghc/ghc][wip/unboxed-codebuffer] Fix warnings
Josh Meredith (@JoshMeredith)
gitlab at gitlab.haskell.org
Thu Feb 16 15:05:18 UTC 2023
Josh Meredith pushed to branch wip/unboxed-codebuffer at Glasgow Haskell Compiler / GHC
Commits:
415614f1 by Josh Meredith at 2023-02-16T15:05:08+00:00
Fix warnings
- - - - -
1 changed file:
- libraries/base/GHC/IO/Encoding/UTF8.hs
Changes:
=====================================
libraries/base/GHC/IO/Encoding/UTF8.hs
=====================================
@@ -112,7 +112,7 @@ utf8_bom_decode ref
output
st0
= do
- let (# st1, first #) = unIO (readIORef ref) st0
+ let !(# st1, first #) = unIO (readIORef ref) st0
if not first
then utf8_decode input output st1
else do
@@ -193,7 +193,7 @@ utf8_decode
1 -> done InputUnderflow ir ow st1
2 -> do -- check for an error even when we don't have
-- the full sequence yet (#3341)
- let (# st2, c1 #) = unIO (readWord8Buf iraw (ir+1)) st1
+ let !(# st2, c1 #) = unIO (readWord8Buf iraw (ir+1)) st1
if not (validate4 c0 c1 0x80 0x80)
then invalid st2 else done InputUnderflow ir ow st2
3 -> do
@@ -241,7 +241,7 @@ utf8_encode
| ow >= os = done OutputUnderflow ir ow st0
| ir >= iw = done InputUnderflow ir ow st0
| otherwise = do
- let (# st1, (c,ir') #) = unIO (readCharBuf iraw ir) st0
+ let !(# st1, (c,ir') #) = unIO (readCharBuf iraw ir) st0
case ord c of
x | x <= 0x7F -> do
let !(# st2, () #) = unIO (writeWord8Buf oraw ow (fromIntegral x)) st1
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/415614f1f4510e9ab24a619e951c6561f9e5859d
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/415614f1f4510e9ab24a619e951c6561f9e5859d
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/38469d87/attachment-0001.html>
More information about the ghc-commits
mailing list