summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-04-19 11:28:46 -0400
committerBen Gamari <ben@smart-cactus.org>2018-04-19 11:28:53 -0400
commit48b88421995b121b62d5b6a1890e61252d49ce90 (patch)
treee14710d8e3c0725fc81fc6c3ab13fd6e7cb31269 /rts/Stats.c
parent803178a5383cdb5383e5b9fedd8feb3d65f9183b (diff)
downloadhaskell-48b88421995b121b62d5b6a1890e61252d49ce90.tar.gz
rts: fix format arguments for debugBelch calls on 32-bit systems
This change fixes build failure like this: ``` rts/Stats.c:1467:14: error: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format=] debugBelch("%51s%9" FMT_Word " %9" FMT_Word "\n", ^~~~~~~~ "",tot_live*sizeof(W_),tot_slop*sizeof(W_)); ~~~~~~~~~~~~~~~~~~~ ``` The fix is to cast sizeof() result to Word (W_). Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Test Plan: build for 32-bit target Reviewers: bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4608
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 44b6e2dff7..3d03d4931b 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -1465,7 +1465,7 @@ statDescribeGens(void)
}
debugBelch("----------------------------------------------------------------------\n");
debugBelch("%51s%9" FMT_Word " %9" FMT_Word "\n",
- "",tot_live*sizeof(W_),tot_slop*sizeof(W_));
+ "",tot_live*(W_)sizeof(W_),tot_slop*(W_)sizeof(W_));
debugBelch("----------------------------------------------------------------------\n");
debugBelch("\n");
}