[postgis-tickets] r17746 - Remove type warnings from 32 bit compilation
Paul Ramsey
pramsey at cleverelephant.ca
Tue Aug 20 02:40:59 PDT 2019
Author: pramsey
Date: 2019-08-20 14:40:59 -0700 (Tue, 20 Aug 2019)
New Revision: 17746
Modified:
branches/2.5/liblwgeom/g_serialized.c
branches/2.5/liblwgeom/lwgeom.c
Log:
Remove type warnings from 32 bit compilation
Modified: branches/2.5/liblwgeom/g_serialized.c
===================================================================
--- branches/2.5/liblwgeom/g_serialized.c 2019-08-20 19:29:09 UTC (rev 17745)
+++ branches/2.5/liblwgeom/g_serialized.c 2019-08-20 21:40:59 UTC (rev 17746)
@@ -233,11 +233,11 @@
static uint64_t B[5] =
{
- 0x5555555555555555,
- 0x3333333333333333,
- 0x0F0F0F0F0F0F0F0F,
- 0x00FF00FF00FF00FF,
- 0x0000FFFF0000FFFF
+ 0x5555555555555555ULL,
+ 0x3333333333333333ULL,
+ 0x0F0F0F0F0F0F0F0FULL,
+ 0x00FF00FF00FF00FFULL,
+ 0x0000FFFF0000FFFFULL
};
static uint64_t S[5] = { 1, 2, 4, 8, 16 };
Modified: branches/2.5/liblwgeom/lwgeom.c
===================================================================
--- branches/2.5/liblwgeom/lwgeom.c 2019-08-20 19:29:09 UTC (rev 17745)
+++ branches/2.5/liblwgeom/lwgeom.c 2019-08-20 21:40:59 UTC (rev 17746)
@@ -2501,7 +2501,7 @@
int digits_left_of_decimal = (int) (1 + log10(fabs(d)));
uint8_t bits_needed = bits_for_precision(decimal_digits + digits_left_of_decimal);
- uint64_t mask = 0xffffffffffffffff << (52 - bits_needed);
+ uint64_t mask = 0xffffffffffffffffULL << (52 - bits_needed);
uint64_t dint = 0;
size_t dsz = sizeof(d) < sizeof(dint) ? sizeof(d) : sizeof(dint);
More information about the postgis-tickets
mailing list