From d42276f10266d826e20d51a5cfb490bddc2f6e89 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Jun 2022 13:01:46 -0400 Subject: Make test logging portable to MinGW and old MS runtimes --- lv2/atom/atom-test.c | 3 +-- lv2/atom/forge-overflow-test.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'lv2/atom') diff --git a/lv2/atom/atom-test.c b/lv2/atom/atom-test.c index 64f8953..230a7cd 100644 --- a/lv2/atom/atom-test.c +++ b/lv2/atom/atom-test.c @@ -20,7 +20,6 @@ #include "lv2/atom/util.h" #include "lv2/urid/urid.h" -#include #include #include #include @@ -73,7 +72,7 @@ main(void) LV2_Atom_Long* two = (LV2_Atom_Long*)lv2_atom_forge_deref( &forge, lv2_atom_forge_long(&forge, 2)); if (two->body != 2) { - return test_fail("%" PRId64 " != 2\n", two->body); + return test_fail("%ld != 2\n", (long)two->body); } // eg_three = (Float)3.0 diff --git a/lv2/atom/forge-overflow-test.c b/lv2/atom/forge-overflow-test.c index 5741453..27f3497 100644 --- a/lv2/atom/forge-overflow-test.c +++ b/lv2/atom/forge-overflow-test.c @@ -37,12 +37,12 @@ test_string_overflow(void) lv2_atom_forge_init(&forge, &map); // Check that writing increasingly long strings fails at the right point - for (size_t count = 0; count < MAX_CHARS; ++count) { + for (unsigned count = 0; count < MAX_CHARS; ++count) { lv2_atom_forge_set_buffer(&forge, buf, capacity); const LV2_Atom_Forge_Ref ref = lv2_atom_forge_string(&forge, str, count); if (!ref) { - return test_fail("Failed to write %zu byte string\n", count); + return test_fail("Failed to write %u byte string\n", count); } } -- cgit v1.2.1