[Git][ghc/ghc][master] 3 commits: rts/linker: Make FreeBSD declarations proper prototypes
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Fri Nov 15 00:10:31 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
f1b0bc32 by Ben Gamari at 2024-11-14T19:09:13-05:00
rts/linker: Make FreeBSD declarations proper prototypes
The iconv declarations for FreeBSD were previously not prototypes,
leading to warnings.
- - - - -
086cbbc1 by Ben Gamari at 2024-11-14T19:09:13-05:00
base: Drop redundant import in FreeBSD ExecutablePath implementation
- - - - -
79ecd199 by Ben Gamari at 2024-11-14T19:09:13-05:00
compiler: Fix partial selector warnings in GHC.Runtime.Heap.Inspect
- - - - -
3 changed files:
- compiler/GHC/Runtime/Heap/Inspect.hs
- libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
- rts/Linker.c
Changes:
=====================================
compiler/GHC/Runtime/Heap/Inspect.hs
=====================================
@@ -892,8 +892,6 @@ extractSubTerms :: (Type -> ForeignHValue -> TcM Term)
-> GenClosure ForeignHValue -> [Type] -> TcM [Term]
extractSubTerms recurse clos = liftM thdOf3 . go 0 0
where
- array = dataArgs clos
-
go ptr_i arr_i [] = return (ptr_i, arr_i, [])
go ptr_i arr_i (ty:tys)
| Just (tc, elem_tys) <- tcSplitTyConApp_maybe ty
@@ -944,7 +942,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0
| otherwise =
let (q, r) = size_b `quotRem` word_size
in assert (r == 0 )
- [ array!!i
+ [ dataArgs clos !! i
| o <- [0.. q - 1]
, let i = (aligned_idx `quot` word_size) + o
]
@@ -967,7 +965,7 @@ extractSubTerms recurse clos = liftM thdOf3 . go 0 0
LittleEndian -> (word `shiftR` moveBits) `shiftL` zeroOutBits `shiftR` zeroOutBits
where
(q, r) = aligned_idx `quotRem` word_size
- word = array!!q
+ word = dataArgs clos !! q
moveBits = r * 8
zeroOutBits = (word_size - size_b) * 8
=====================================
libraries/ghc-internal/src/GHC/Internal/System/Environment/ExecutablePath.hsc
=====================================
@@ -73,7 +73,6 @@ import GHC.Internal.Control.Exception (catch, throw)
import GHC.Internal.Data.Functor
import GHC.Internal.Foreign.C.Types
import GHC.Internal.Foreign.C.Error
-import GHC.Internal.Foreign.C.String
import GHC.Internal.Foreign.Marshal.Alloc
import GHC.Internal.Foreign.Marshal.Array
import GHC.Internal.Foreign.Ptr
=====================================
rts/Linker.c
=====================================
@@ -105,12 +105,12 @@
*/
#if defined(freebsd_HOST_OS)
-extern void iconvctl();
-extern void iconv_open_into();
-extern void iconv_open();
-extern void iconv_close();
-extern void iconv_canonicalize();
-extern void iconv();
+extern void iconvctl(void);
+extern void iconv_open_into(void);
+extern void iconv_open(void);
+extern void iconv_close(void);
+extern void iconv_canonicalize(void);
+extern void iconv(void);
#endif
/*
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd0a8b7e7537499f7dc703f78ac96f34e4c40554...79ecd19949a276b17c7a646ed35ee9e437452ca9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bd0a8b7e7537499f7dc703f78ac96f34e4c40554...79ecd19949a276b17c7a646ed35ee9e437452ca9
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/20241114/e4232a4f/attachment-0001.html>
More information about the ghc-commits
mailing list