From 6c1848b1e3b8969afc441f094b0d7b64b4b14933 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Feb 2018 15:52:35 -0600 Subject: [PATCH] Misc warning fixes --- test/api/test-blob.c | 2 +- test/api/test-buffer.c | 14 +++++++------- test/api/test-ot-tag.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/api/test-blob.c b/test/api/test-blob.c index f67133199..d566f4e9d 100644 --- a/test/api/test-blob.c +++ b/test/api/test-blob.c @@ -116,7 +116,7 @@ free_up_free (fixture_t *fixture) static uintptr_t get_pagesize (void) { - uintptr_t pagesize = -1; + uintptr_t pagesize = (uintptr_t) -1; #if defined(HAVE_SYSCONF) && defined(_SC_PAGE_SIZE) pagesize = (uintptr_t) sysconf (_SC_PAGE_SIZE); diff --git a/test/api/test-buffer.c b/test/api/test-buffer.c index 51322a4be..ef4fc855b 100644 --- a/test/api/test-buffer.c +++ b/test/api/test-buffer.c @@ -764,15 +764,15 @@ typedef struct { /* note: we skip the first and last item from utf32 when adding to buffer */ static const utf32_conversion_test_t utf32_conversion_tests[] = { - {{0x41, 0x004D, 0x0430, 0x4E8C, 0xD800, 0xDF02, 0x61} , {0x004D, 0x0430, 0x4E8C, -3, -3}}, + {{0x41, 0x004D, 0x0430, 0x4E8C, 0xD800, 0xDF02, 0x61} , {0x004D, 0x0430, 0x4E8C, (hb_codepoint_t) -3, (hb_codepoint_t) -3}}, {{0x41, 0x004D, 0x0430, 0x4E8C, 0x10302, 0x61} , {0x004D, 0x0430, 0x4E8C, 0x10302}}, - {{0x41, 0xD800, 0xDF02, 0x61}, {-3, -3}}, - {{0x41, 0xD800, 0xDF02}, {-3}}, - {{0x41, 0x61, 0xD800, 0xDF02}, {0x61, -3}}, - {{0x41, 0xD800, 0x61, 0xDF02}, {-3, 0x61}}, - {{0x41, 0xDF00, 0x61}, {-3}}, + {{0x41, 0xD800, 0xDF02, 0x61}, {(hb_codepoint_t) -3, (hb_codepoint_t) -3}}, + {{0x41, 0xD800, 0xDF02}, {(hb_codepoint_t) -3}}, + {{0x41, 0x61, 0xD800, 0xDF02}, {0x61, (hb_codepoint_t) -3}}, + {{0x41, 0xD800, 0x61, 0xDF02}, {(hb_codepoint_t) -3, 0x61}}, + {{0x41, 0xDF00, 0x61}, {(hb_codepoint_t) -3}}, {{0x41, 0x10FFFF, 0x61}, {0x10FFFF}}, - {{0x41, 0x110000, 0x61}, {-3}}, + {{0x41, 0x110000, 0x61}, {(hb_codepoint_t) -3}}, {{0x41, 0x61}, {0}} }; diff --git a/test/api/test-ot-tag.c b/test/api/test-ot-tag.c index 1abbc1db5..6fe79b422 100644 --- a/test/api/test-ot-tag.c +++ b/test/api/test-ot-tag.c @@ -37,7 +37,7 @@ static void test_simple_tags (const char *s, hb_script_t script) { hb_script_t tag; - hb_script_t t1, t2; + hb_tag_t t1, t2; g_test_message ("Testing script %c%c%c%c: tag %s", HB_UNTAG (hb_script_to_iso15924_tag (script)), s); tag = hb_tag_from_string (s, -1);