]> granicus.if.org Git - postgresql/commitdiff
Add an explicit cast to Size to hyperloglog.c
authorRobert Haas <rhaas@postgresql.org>
Fri, 23 Jan 2015 16:44:51 +0000 (11:44 -0500)
committerRobert Haas <rhaas@postgresql.org>
Fri, 23 Jan 2015 16:44:51 +0000 (11:44 -0500)
MSVC generates a warning here; we hope this will make it happy.

Report by Michael Paquier.  Patch by David Rowley.

src/backend/lib/hyperloglog.c

index 1157e9ad76357af2baa5abd637056afbf5d1675f..4b37048c37bb47c580667ed20bae4b5c0a1ffd0a 100644 (file)
@@ -70,7 +70,7 @@ initHyperLogLog(hyperLogLogState *cState, uint8 bwidth)
                elog(ERROR, "bit width must be between 4 and 16 inclusive");
 
        cState->registerWidth = bwidth;
-       cState->nRegisters = 1 << bwidth;
+       cState->nRegisters = (Size) 1 << bwidth;
        cState->arrSize = sizeof(uint8) * cState->nRegisters + 1;
 
        /*