From 3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Fri, 4 Mar 2022 13:18:35 +0100 Subject: Updated printf formatting to portable code. This was also to use http://winlibs.com gcc+clang with ucrt runtime-libs without warnings. --- examples/csmap_erase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/csmap_erase.c') diff --git a/examples/csmap_erase.c b/examples/csmap_erase.c index 68a0378b..2716ad8f 100644 --- a/examples/csmap_erase.c +++ b/examples/csmap_erase.c @@ -12,7 +12,7 @@ void printmap(mymap m) { c_foreach (elem, mymap, m) printf(" [%d, %s]", elem.ref->first, elem.ref->second.str); - printf("\nsize() == %zu\n\n", mymap_size(m)); + printf("\nsize() == %" PRIuMAX "\n\n", mymap_size(m)); } int main() @@ -72,7 +72,7 @@ int main() // The 3rd member function removes elements with a given Key size_t count = mymap_erase(&m3, 2); // The 3rd member function also returns the number of elements removed - printf("The number of elements removed from m3 is: %zu\n", count); + printf("The number of elements removed from m3 is: %" PRIuMAX "\n", count); puts("After the element with a key of 2 is deleted, the map m3 is:"); printmap(m3); } -- cgit v1.2.3