diff options
author | Tom Lane | 2016-01-22 02:14:07 +0000 |
---|---|---|
committer | Tom Lane | 2016-01-22 02:14:07 +0000 |
commit | d9b9289c837a98b78b948b597fabd9ab0a96c0db (patch) | |
tree | 61348ef6f0101d7f4bcdebcd8fd9342296c09192 | |
parent | be44ed27b86ebd165bbedf06a4ac5a8eb943d43c (diff) |
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
-rw-r--r-- | src/backend/access/gin/ginvalidate.c | 3 | ||||
-rw-r--r-- | src/backend/access/gist/gistvalidate.c | 3 | ||||
-rw-r--r-- | src/backend/access/spgist/spgvalidate.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/backend/access/gin/ginvalidate.c b/src/backend/access/gin/ginvalidate.c index b87833bd5a..87177fc96b 100644 --- a/src/backend/access/gin/ginvalidate.c +++ b/src/backend/access/gin/ginvalidate.c @@ -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 */ diff --git a/src/backend/access/gist/gistvalidate.c b/src/backend/access/gist/gistvalidate.c index 190b9787bb..d3ada703f3 100644 --- a/src/backend/access/gist/gistvalidate.c +++ b/src/backend/access/gist/gistvalidate.c @@ -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 */ diff --git a/src/backend/access/spgist/spgvalidate.c b/src/backend/access/spgist/spgvalidate.c index ba7c828453..29ae3b8be6 100644 --- a/src/backend/access/spgist/spgvalidate.c +++ b/src/backend/access/spgist/spgvalidate.c @@ -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), |