Skip to content
Snippets Groups Projects
Commit 93c2a3ac authored by Sven Tennie's avatar Sven Tennie :smiley_cat:
Browse files

Fix C warnings (#25237)

GCC 14 treats the fixed warnings as errors by default. I.e. we're
gaining GCC 14 compatibility with these fixes.
parent fb0a4e5c
No related tags found
1 merge request!13218Fix C warnings (#25237)
Pipeline #100055 passed
......@@ -193,7 +193,7 @@ void create_any_bco_frame(Capability *cap, StgStack *stack, StgWord w) {
StgWord bcoSizeWords =
sizeofW(StgBCO) + sizeofW(StgLargeBitmap) + sizeofW(StgWord);
StgBCO *bco = (StgBCO *)allocate(cap, bcoSizeWords);
SET_HDR(bco, &stg_BCO_info, CCS_MAIN);
SET_HDR(bco, (StgInfoTable*) &stg_BCO_info, CCS_MAIN);
c->payload[0] = (StgClosure *)bco;
bco->size = bcoSizeWords;
......
......@@ -27,10 +27,10 @@ void checkGcRoots(void)
rts_listThreads(&collectTSOsCallback, NULL);
for (int i = 0; i < tsoCount; i++)
{
StgTSO *tso = UNTAG_CLOSURE(tsos[i]);
StgClosure *tso = UNTAG_CLOSURE((StgClosure*) tsos[i]);
if (get_itbl(tso)->type != TSO)
{
fprintf(stderr, "tso returned a non-TSO type %zu at index %i\n",
fprintf(stderr, "tso returned a non-TSO type %u at index %i\n",
tso->header.info->type,
i);
exit(1);
......@@ -44,7 +44,7 @@ void checkGcRoots(void)
StgClosure *root = UNTAG_CLOSURE(miscRoots[i]);
if (get_itbl(root)->type == TSO)
{
fprintf(stderr, "rts_listThreads unexpectedly returned an TSO type at index %i (TSO=%zu)\n", i, TSO);
fprintf(stderr, "rts_listThreads unexpectedly returned an TSO type at index %i (TSO=%d)\n", i, TSO);
exit(1);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment