summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-07-04 04:48:07 +0200
committerDaniel Gröber <dxld@darkboxed.org>2019-09-22 15:18:10 +0200
commit187192a61a57bdb461b655931618aee80f0928a9 (patch)
tree38db7a93bb6e5bd0fb20d7f8c50ab448c6ac0dea /rts
parent96adf1798527e1974a5daa196b50ef2840106c3c (diff)
downloadhaskell-187192a61a57bdb461b655931618aee80f0928a9.tar.gz
rts: RetainerProfile.c: Re-enable and fix warnings
Turns out some genius disabled warnings for RetainerProfile.c in the build system. That would have been good to know about five silent type mismatch crashes ago.. :)
Diffstat (limited to 'rts')
-rw-r--r--rts/RetainerProfile.c20
-rw-r--r--rts/TraverseHeap.h2
-rw-r--r--rts/ghc.mk1
3 files changed, 12 insertions, 11 deletions
diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c
index 745aad3f7e..5eaf5802b9 100644
--- a/rts/RetainerProfile.c
+++ b/rts/RetainerProfile.c
@@ -363,6 +363,8 @@ find_srt( stackPos *info )
info->next.srt.srt = NULL;
return c;
}
+
+ return NULL;
}
/**
@@ -449,7 +451,6 @@ STATIC_INLINE void
traversePushChildren(traverseState *ts, StgClosure *c, stackData data, StgClosure **first_child)
{
stackElement se;
- bdescr *nbd; // Next Block Descriptor
debug("traversePushChildren(): stackTop = 0x%x\n", ts->stackTop);
@@ -606,6 +607,7 @@ traversePushChildren(traverseState *ts, StgClosure *c, stackData data, StgClosur
// SRT only
case THUNK_STATIC:
ASSERT(get_itbl(c)->srt != 0);
+ /* fall-thru */
case THUNK_0_1:
case THUNK_0_2:
thunk_srt_only:
@@ -985,7 +987,7 @@ traverseMaybeInitClosureData(StgClosure *c)
* that decision is lost in time.
* -------------------------------------------------------------------------- */
STATIC_INLINE bool
-isRetainer( StgClosure *c )
+isRetainer( const StgClosure *c )
{
switch (get_itbl(c)->type) {
//
@@ -1192,7 +1194,6 @@ static void
traversePushStack(traverseState *ts, StgClosure *cp, stackData data,
StgPtr stackStart, StgPtr stackEnd)
{
- stackElement *oldStackBoundary;
StgPtr p;
const StgRetInfoTable *info;
StgWord bitmap;
@@ -1335,8 +1336,10 @@ traversePAP (traverseState *ts,
}
static bool
-retainVisitClosure( const StgClosure *c, const StgClosure *cp, const stackData data, const bool first_visit, stackData *out_data )
+retainVisitClosure( StgClosure *c, const StgClosure *cp, const stackData data, const bool first_visit, stackData *out_data )
{
+ (void) first_visit;
+
retainer r = data.c_child_r;
RetainerSet *s, *retainerSetOfc;
retainerSetOfc = retainerSetOf(c);
@@ -1525,9 +1528,10 @@ inner_loop:
// reachable static objects.
goto loop;
}
+ /* fall-thru */
case FUN_STATIC: {
- StgInfoTable *info = get_itbl(c);
+ const StgInfoTable *info = get_itbl(c);
if (info->srt == 0 && info->layout.payload.ptrs == 0) {
goto loop;
} else {
@@ -1657,8 +1661,6 @@ computeRetainerSet( traverseState *ts )
{
StgWeak *weak;
uint32_t g, n;
- StgPtr ml;
- bdescr *bd;
markCapabilities(retainRoot, (void*)ts); // for scheduler roots
@@ -1745,8 +1747,8 @@ resetStaticObjectForProfiling( StgClosure *static_objects )
p = (StgClosure*)*STATIC_LINK(get_itbl(p), p);
break;
default:
- barf("resetStaticObjectForProfiling: %p (%s)",
- p, get_itbl(p)->type);
+ barf("resetStaticObjectForProfiling: %p (%lu)",
+ p, (unsigned long)get_itbl(p)->type);
break;
}
}
diff --git a/rts/TraverseHeap.h b/rts/TraverseHeap.h
index a82bf0ec6d..ad1135519c 100644
--- a/rts/TraverseHeap.h
+++ b/rts/TraverseHeap.h
@@ -95,7 +95,7 @@ typedef struct traverseState_ {
* once you can simply return 'first_visit'.
*/
typedef bool (*visitClosure_cb) (
- const StgClosure *c,
+ StgClosure *c,
const StgClosure *cp,
const stackData data,
const bool first_visit,
diff --git a/rts/ghc.mk b/rts/ghc.mk
index d913a9c695..9cd66920c7 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -504,7 +504,6 @@ rts/sm/Compact_CC_OPTS += -Wno-inline
# emits warnings about call-clobbered registers on x86_64
rts/StgCRun_CC_OPTS += -w
-rts/RetainerProfile_CC_OPTS += -w
# On Windows:
rts/win32/ConsoleHandler_CC_OPTS += -w
rts/win32/ThrIOManager_CC_OPTS += -w