Duncan Coutts pushed to branch wip/dcoutts/printf-warnings at Glasgow Haskell Compiler / GHC Commits: 13570c2f by Duncan Coutts at 2026-09-02T23:31:01+01:00 FIXUP: yet more format fixes, found in CI - - - - - 4 changed files: - rts/Messages.c - rts/STM.c - rts/posix/Poll.c - rts/sm/GC.c Changes: ===================================== rts/Messages.c ===================================== @@ -134,8 +134,8 @@ loop: if (i == &stg_MSG_TRY_WAKEUP_info) { StgTSO *tso = ((MessageWakeup *)m)->tso; - debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %" - FMT_StgThreadID, tso->id); + debugTraceCap(DEBUG_sched, cap, + "message: try wakeup thread %" FMT_StgThreadID, tso->id); tryWakeupThread(cap, tso); } else if (i == &stg_MSG_THROWTO_info) @@ -150,8 +150,8 @@ loop: goto loop; } - debugTraceCap(DEBUG_sched, cap, "message: throwTo %ld -> %ld", - (W_)t->source->id, (W_)t->target->id); + debugTraceCap(DEBUG_sched, cap, "message: throwTo %" FMT_StgThreadID + " -> %" FMT_StgThreadID, t->source->id, t->target->id); r = throwToMsg(cap, t); ===================================== rts/STM.c ===================================== @@ -781,7 +781,7 @@ static StgBool validate_and_acquire_ownership (Capability *cap, result = false; BREAK_FOR_EACH; } else { - TRACE("%p : need to check version %ld", trec, e -> num_updates); + TRACE("%p : need to check version %" FMT_Int, trec, e->num_updates); } }); } @@ -816,7 +816,8 @@ static StgBool check_read_only(StgTRecHeader *trec STG_UNUSED) { StgTVar *s; s = e -> tvar; if (entry_is_read_only(e)) { - TRACE("%p : check_read_only for TVar %p, saw %ld", trec, s, e -> num_updates); + TRACE("%p : check_read_only for TVar %p, saw %" FMT_Int, + trec, s, e->num_updates); // We must first load current_value then num_updates; this is inverse of // the order of the stores in stmCommitTransaction. @@ -1200,7 +1201,7 @@ of these false-positives causing actual issues. StgBool stmValidateNestOfTransactions(Capability *cap, StgTRecHeader *trec, StgBool optimistically) { StgTRecHeader *t; - TRACE("%p : stmValidateNestOfTransactions, %b", trec, optimistically); + TRACE("%p : stmValidateNestOfTransactions, %d", trec, optimistically); ASSERT(trec != NO_TREC); ASSERT((trec -> state == TREC_ACTIVE) || (trec -> state == TREC_WAITING) || ===================================== rts/posix/Poll.c ===================================== @@ -432,13 +432,13 @@ void pollCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) debugTrace(DEBUG_iomanager, "ppoll(nfds = %lu, timeout.sec = 0, timeout.nsec = 0) = %d", - nfds, res); + (unsigned long) nfds, res); #else int res = poll(poll_table, nfds, 0); debugTrace(DEBUG_iomanager, "poll(nfds = %lu, timeout_ms = 0) = %d", - nfds, res); + (unsigned long) nfds, res); #endif if (res == 0) { /* There is no I/O ready. We'll return to the scheduler. */ @@ -513,8 +513,9 @@ bool awaitCompletedTimeoutsOrIOPoll(CapIOManager *iomgr) debugTrace(DEBUG_iomanager, "ppoll(nfds = %lu, timeout.sec = %lu, timeout.nsec = %lu) = %d", - nfds, timeout_ns == NULL ? -1 : timeout_ns->tv_sec, - timeout_ns == NULL ? 0 : timeout_ns->tv_nsec, + (unsigned long) nfds, + timeout_ns == NULL ? -1 : timeout_ns->tv_sec, + timeout_ns == NULL ? 0 : timeout_ns->tv_nsec, res); #else int res = poll(poll_table, nfds, timeout_ms); ===================================== rts/sm/GC.c ===================================== @@ -636,13 +636,13 @@ GarbageCollect (struct GcConfig config, if(idle_cap[i]) { continue; } thread = gc_threads[i]; debugTrace(DEBUG_gc,"thread %d:", i); - debugTrace(DEBUG_gc," copied %ld", + debugTrace(DEBUG_gc," copied %" FMT_Word, RELAXED_LOAD(&thread->copied) * sizeof(W_)); - debugTrace(DEBUG_gc," scanned %ld", + debugTrace(DEBUG_gc," scanned %" FMT_Word, RELAXED_LOAD(&thread->scanned) * sizeof(W_)); - debugTrace(DEBUG_gc," any_work %ld", + debugTrace(DEBUG_gc," any_work %" FMT_Word, RELAXED_LOAD(&thread->any_work)); - debugTrace(DEBUG_gc," scav_find_work %ld", + debugTrace(DEBUG_gc," scav_find_work %" FMT_Word , RELAXED_LOAD(&thread->scav_find_work)); any_work += RELAXED_LOAD(&thread->any_work); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/13570c2f3f71d269e30b400623cb14d1... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/13570c2f3f71d269e30b400623cb14d1... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help