summaryrefslogtreecommitdiffhomepage
path: root/examples/priority.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-03-04 13:18:35 +0100
committerTyge Løvset <[email protected]>2022-03-04 13:18:35 +0100
commit3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60 (patch)
tree46975c8374107e44fd9605894ce5b02d981ba538 /examples/priority.c
parentc4301c6b492bb962a943335bf8df4920b2a699cf (diff)
downloadSTC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.tar.gz
STC-modified-3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60.zip
Updated printf formatting to portable code. This was also to use http://winlibs.com gcc+clang with ucrt runtime-libs without warnings.
Diffstat (limited to 'examples/priority.c')
-rw-r--r--examples/priority.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/priority.c b/examples/priority.c
index 184cad9f..1767dba8 100644
--- a/examples/priority.c
+++ b/examples/priority.c
@@ -15,7 +15,7 @@ int main() {
c_auto (cpque_i, heap)
{
// Push ten million random numbers to priority queue
- printf("Push %zu numbers\n", N);
+ printf("Push %" PRIuMAX " numbers\n", N);
c_forrange (N)
cpque_i_push(&heap, stc64_uniform(&rng, &dist));
@@ -27,7 +27,7 @@ int main() {
puts("Extract the hundred smallest.");
c_forrange (100) {
- printf("%zd ", *cpque_i_top(&heap));
+ printf("%" PRIdMAX " ", *cpque_i_top(&heap));
cpque_i_pop(&heap);
}
}