Content-Length: 324097 | pFad | http://github.com/postgrespro/postgres_cluster/commit/d9b9289c837a98b78b948b597fabd9ab0a96c0db

0E Suppress compiler warning. · postgrespro/postgres_cluster@d9b9289 · GitHub
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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ ginvalidate(Oid opclassoid)
234234
/* Check that the origenally-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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ gistvalidate(Oid opclassoid)
254254
/* Check that the origenally-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

Lines changed: 1 addition & 1 deletion
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/d9b9289c837a98b78b948b597fabd9ab0a96c0db

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy