From: Sebastian Pipping Date: Sun, 3 Dec 2017 17:32:57 +0000 (+0100) Subject: Address 64bit intptr_t loss warning for Visual Studio X-Git-Tag: R_2_2_6~34^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5322b01ac4d8f83ea60b2b61e5790e5a9ed18f3;p=libexpat Address 64bit intptr_t loss warning for Visual Studio Message was: warning C4244: '=' : conversion from 'intptr_t' to 'int', possible loss of data --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 4ffe80cd..0ee8b8f8 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -5050,7 +5050,7 @@ external_entity_devaluer(XML_Parser parser, "\n" "%e1;\n"; XML_Parser ext_parser; - int clear_handler = (intptr_t)XML_GetUserData(parser); + intptr_t clear_handler = (intptr_t)XML_GetUserData(parser); if (systemId == NULL || !xcstrcmp(systemId, XCS("bar"))) return XML_STATUS_OK; @@ -7865,8 +7865,8 @@ END_TEST #define ALLOC_ALWAYS_SUCCEED (-1) #define REALLOC_ALWAYS_SUCCEED (-1) -static int allocation_count = ALLOC_ALWAYS_SUCCEED; -static int reallocation_count = REALLOC_ALWAYS_SUCCEED; +static intptr_t allocation_count = ALLOC_ALWAYS_SUCCEED; +static intptr_t reallocation_count = REALLOC_ALWAYS_SUCCEED; /* Crocked allocator for allocation failure tests */ static void *duff_allocator(size_t size)