Suppress compiler warning.

Given the limited range of i, these shifts should not cause any
problem, but that apparently doesn't stop some compilers from
whining about them.

David Rowley
This commit is contained in:
Tom Lane 2016-01-21 21:14:07 -05:00
parent be44ed27b8
commit d9b9289c83
3 changed files with 5 additions and 3 deletions

View File

@ -234,7 +234,8 @@ ginvalidate(Oid opclassoid)
/* Check that the originally-named opclass is complete */
for (i = 1; i <= GINNProcs; i++)
{
if (opclassgroup && (opclassgroup->functionset & (1 << i)) != 0)
if (opclassgroup &&
(opclassgroup->functionset & (((uint64) 1) << i)) != 0)
continue; /* got it */
if (i == GIN_COMPARE_PARTIAL_PROC)
continue; /* optional method */

View File

@ -254,7 +254,8 @@ gistvalidate(Oid opclassoid)
/* Check that the originally-named opclass is complete */
for (i = 1; i <= GISTNProcs; i++)
{
if (opclassgroup && (opclassgroup->functionset & (1 << i)) != 0)
if (opclassgroup &&
(opclassgroup->functionset & (((uint64) 1) << i)) != 0)
continue; /* got it */
if (i == GIST_DISTANCE_PROC || i == GIST_FETCH_PROC)
continue; /* optional methods */

View File

@ -213,7 +213,7 @@ spgvalidate(Oid opclassoid)
for (i = 1; i <= SPGISTNProc; i++)
{
if ((thisgroup->functionset & (1 << i)) != 0)
if ((thisgroup->functionset & (((uint64) 1) << i)) != 0)
continue; /* got it */
ereport(INFO,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),