Commit 60c49861 authored by Siddharth's avatar Siddharth Committed by Ben Gamari

Typecast covers entire expression to fix format warning.

- Fixes (#12636).
- changes all the typecasts to _unsinged long long_ to
  have the format specifiers work.

Reviewers: austin, bgamari, erikd, simonmar, Phyx

Reviewed By: erikd, Phyx

Subscribers: thomie

Differential Revision:
parent 2d6e91ea
......@@ -770,17 +770,22 @@ dumpCensus( Census *census )
/* change typecast to uint64_t to remove
* print formatting warning. See #12636 */
if (RtsFlags.ProfFlags.doHeapProfile == HEAP_BY_LDV) {
fprintf(hp_file, "VOID\t%lu\n",
(unsigned long)(census->void_total) * sizeof(W_));
fprintf(hp_file, "LAG\t%lu\n",
(unsigned long)(census->not_used - census->void_total) * sizeof(W_));
fprintf(hp_file, "USE\t%lu\n",
(unsigned long)(census->used - census->drag_total) * sizeof(W_));
fprintf(hp_file, "INHERENT_USE\t%lu\n",
(unsigned long)(census->prim) * sizeof(W_));
fprintf(hp_file, "DRAG\t%lu\n",
(unsigned long)(census->drag_total) * sizeof(W_));
fprintf(hp_file, "VOID\t%" FMT_Word64 "\n",
(uint64_t)(census->void_total *
fprintf(hp_file, "LAG\t%" FMT_Word64 "\n",
(uint64_t)((census->not_used - census->void_total) *
fprintf(hp_file, "USE\t%" FMT_Word64 "\n",
(uint64_t)((census->used - census->drag_total) *
fprintf(hp_file, "INHERENT_USE\t%" FMT_Word64 "\n",
(uint64_t)(census->prim * sizeof(W_)));
fprintf(hp_file, "DRAG\t%" FMT_Word64 "\n",
(uint64_t)(census->drag_total * sizeof(W_)));
printSample(false, census->time);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment