From 547553278c24bd262211f85e15fbfa51516d57ba Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Mon, 10 Oct 2016 14:14:50 +0200 Subject: [PATCH] use #ifdef POCO_LONG_IS_64_BIT instead of if (sizeof(... to avoid warnings --- XML/src/xmlparse.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/XML/src/xmlparse.cpp b/XML/src/xmlparse.cpp index 8fb98b6cc..1de8864b8 100644 --- a/XML/src/xmlparse.cpp +++ b/XML/src/xmlparse.cpp @@ -739,11 +739,11 @@ generate_hash_secret_salt(XML_Parser parser) platform_gather_time_entropy() ^ platform_getpid() ^ (unsigned long)parser; /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */ - if (sizeof(unsigned long) == 4) { - return entropy * 2147483647; - } else { - return entropy * 2305843009213693951ULL; - } +#ifdef POCO_LONG_IS_64_BIT + return entropy * 2305843009213693951ULL; +#else + return entropy * 2147483647; +#endif } static XML_Bool /* only valid for root parser */