Skip to content

Commit d9b9289

Browse files
committed
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
1 parent be44ed2 commit d9b9289

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/backend/access/gin/ginvalidate.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ ginvalidate(Oid opclassoid)
234234
/* Check that the originally-named opclass is complete */
235235
for (i = 1; i <= GINNProcs; i++)
236236
{
237-
if (opclassgroup && (opclassgroup->functionset & (1 << i)) != 0)
237+
if (opclassgroup &&
238+
(opclassgroup->functionset & (((uint64) 1) << i)) != 0)
238239
continue; /* got it */
239240
if (i == GIN_COMPARE_PARTIAL_PROC)
240241
continue; /* optional method */

src/backend/access/gist/gistvalidate.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ gistvalidate(Oid opclassoid)
254254
/* Check that the originally-named opclass is complete */
255255
for (i = 1; i <= GISTNProcs; i++)
256256
{
257-
if (opclassgroup && (opclassgroup->functionset & (1 << i)) != 0)
257+
if (opclassgroup &&
258+
(opclassgroup->functionset & (((uint64) 1) << i)) != 0)
258259
continue; /* got it */
259260
if (i == GIST_DISTANCE_PROC || i == GIST_FETCH_PROC)
260261
continue; /* optional methods */

src/backend/access/spgist/spgvalidate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ spgvalidate(Oid opclassoid)
213213

214214
for (i = 1; i <= SPGISTNProc; i++)
215215
{
216-
if ((thisgroup->functionset & (1 << i)) != 0)
216+
if ((thisgroup->functionset & (((uint64) 1) << i)) != 0)
217217
continue; /* got it */
218218
ereport(INFO,
219219
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),

0 commit comments

Comments
 (0)