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/box2.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/box2.c')
| -rw-r--r-- | examples/box2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/box2.c b/examples/box2.c index d5905877..e5b4dacd 100644 --- a/examples/box2.c +++ b/examples/box2.c @@ -67,22 +67,22 @@ int main(void) { // Double indirection
box_in_a_box = cbox_BoxPoint_from(boxed_origin());
- printf("Point occupies %zu bytes on the stack\n",
+ printf("Point occupies %" PRIuMAX " bytes on the stack\n",
sizeof(point));
- printf("Rectangle occupies %zu bytes on the stack\n",
+ printf("Rectangle occupies %" PRIuMAX " bytes on the stack\n",
sizeof(rectangle));
// box size == pointer size
- printf("Boxed point occupies %zu bytes on the stack\n",
+ printf("Boxed point occupies %" PRIuMAX " bytes on the stack\n",
sizeof(boxed_point));
- printf("Boxed rectangle occupies %zu bytes on the stack\n",
+ printf("Boxed rectangle occupies %" PRIuMAX " bytes on the stack\n",
sizeof(boxed_rectangle));
- printf("Boxed box occupies %zu bytes on the stack\n",
+ printf("Boxed box occupies %" PRIuMAX " bytes on the stack\n",
sizeof(box_in_a_box));
// Copy the data contained in `boxed_point` into `unboxed_point`
Point unboxed_point = *boxed_point.get;
- printf("Unboxed point occupies %zu bytes on the stack\n",
+ printf("Unboxed point occupies %" PRIuMAX " bytes on the stack\n",
sizeof(unboxed_point));
}
}
|
