[Git][ghc/ghc][wip/ldv-profile] Fix warning

Matthew Pickering gitlab at gitlab.haskell.org
Thu Jun 6 22:55:37 UTC 2019



Matthew Pickering pushed to branch wip/ldv-profile at Glasgow Haskell Compiler / GHC


Commits:
93c36aac by Matthew Pickering at 2019-06-06T22:55:27Z
Fix warning

- - - - -


2 changed files:

- includes/Rts.h
- includes/rts/storage/ClosureMacros.h


Changes:

=====================================
includes/Rts.h
=====================================
@@ -147,6 +147,14 @@ void _assertFail(const char *filename, unsigned int linenum)
 #define USED_IF_NOT_THREADS
 #endif
 
+#if defined(PROFILING)
+#define USED_IF_PROFILING
+#define USED_IF_NOT_PROFILING STG_UNUSED
+#else
+#define USED_IF_PROFILING STG_UNUSED
+#define USED_IF_NOT_PROFILING
+#endif
+
 #define FMT_SizeT    "zu"
 #define FMT_HexSizeT "zx"
 


=====================================
includes/rts/storage/ClosureMacros.h
=====================================
@@ -545,7 +545,7 @@ EXTERN_INLINE void overwritingClosure_ (StgClosure *p,
                                         uint32_t size /* closure size, in words */,
                                         bool prim /* Whether to call LDV_recordDead */
                                         );
-EXTERN_INLINE void overwritingClosure_ (StgClosure *p, uint32_t offset, uint32_t size, bool prim)
+EXTERN_INLINE void overwritingClosure_ (StgClosure *p, uint32_t offset, uint32_t size, bool prim USED_IF_PROFILING)
 {
 #if ZERO_SLOP_FOR_LDV_PROF && !ZERO_SLOP_FOR_SANITY_CHECK
     // see Note [zeroing slop], also #8402



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/93c36aac7d05a967b418d71ec1c68cf01d08ef1f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/93c36aac7d05a967b418d71ec1c68cf01d08ef1f
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/20190606/d2349ba6/attachment-0001.html>


More information about the ghc-commits mailing list