diff options
| author | Tyge Løvset <[email protected]> | 2022-03-04 13:18:35 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-03-04 13:18:35 +0100 |
| commit | 3c379fbfb2b7301cd5c4f5371a9f0b96a1369b60 (patch) | |
| tree | 46975c8374107e44fd9605894ce5b02d981ba538 /examples/csmap_erase.c | |
| parent | c4301c6b492bb962a943335bf8df4920b2a699cf (diff) | |
| download | STC-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/csmap_erase.c')
| -rw-r--r-- | examples/csmap_erase.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |
