Commit 4d1c3b72 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

rts: Add format attribute to barf

Test Plan: Validate

Reviewers: erikd, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie, carter

Differential Revision: https://phabricator.haskell.org/D4374
parent 1512b633
......@@ -40,7 +40,8 @@
* expected to return.
*/
void barf(const char *s, ...)
GNUC3_ATTRIBUTE(__noreturn__);
GNUC3_ATTRIBUTE(__noreturn__)
GNUC3_ATTRIBUTE(format(printf, 1, 2));
void vbarf(const char *s, va_list ap)
GNUC3_ATTRIBUTE(__noreturn__);
......
......@@ -362,7 +362,7 @@ void initCapabilities (void)
}
n_numa_nodes = logical;
if (logical == 0) {
barf("%s: available NUMA node set is empty");
barf("available NUMA node set is empty");
}
}
......
......@@ -271,7 +271,7 @@ schedule (Capability *initialCapability, Task *task)
}
break;
default:
barf("sched_state: %d", sched_state);
barf("sched_state: %ld", sched_state);
}
scheduleFindWork(&cap);
......
......@@ -876,7 +876,7 @@ printThreadBlockage(StgTSO *tso)
debugBelch("is blocked on an STM operation");
break;
default:
barf("printThreadBlockage: strange tso->why_blocked: %d for TSO %d (%d)",
barf("printThreadBlockage: strange tso->why_blocked: %d for TSO %d (%p)",
tso->why_blocked, tso->id, tso);
}
}
......
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