aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/acl.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2022-11-25 11:05:22 +1300
committerDavid Rowley <drowley@postgresql.org>2022-11-25 11:05:22 +1300
commit2d1f3bce97a9f4ac3ec4acbf337ffef598522216 (patch)
tree4aa2def50e3bb63c2ebf91a4f85d918a85371437 /src/backend/utils/adt/acl.c
parentec5affdbc283252327e217f99c45574eb63de051 (diff)
downloadpostgresql-2d1f3bce97a9f4ac3ec4acbf337ffef598522216.tar.gz
postgresql-2d1f3bce97a9f4ac3ec4acbf337ffef598522216.zip
Fix some 32-bit shift warnings in MSVC
7b378237a widened AclMode to 64 bits which resulted in 3 new additional warnings on MSVC. Here we make use of UINT64CONST to reassure the compiler that we do intend the bit shift expression to yield a 64-bit result. Discussion: https://postgr.es/m/CAApHDvo=pn01Y_3zASZZqn+cotF1c4QFCwWgk6MiF0VscaE5ug@mail.gmail.com
Diffstat (limited to 'src/backend/utils/adt/acl.c')
-rw-r--r--src/backend/utils/adt/acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index d4d68f97243..f8eedfe1700 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -626,9 +626,9 @@ aclitemout(PG_FUNCTION_ARGS)
for (i = 0; i < N_ACL_RIGHTS; ++i)
{
- if (ACLITEM_GET_PRIVS(*aip) & (1 << i))
+ if (ACLITEM_GET_PRIVS(*aip) & (UINT64CONST(1) << i))
*p++ = ACL_ALL_RIGHTS_STR[i];
- if (ACLITEM_GET_GOPTIONS(*aip) & (1 << i))
+ if (ACLITEM_GET_GOPTIONS(*aip) & (UINT64CONST(1) << i))
*p++ = '*';
}
@@ -1786,7 +1786,7 @@ aclexplode(PG_FUNCTION_ARGS)
break;
}
aidata = &aidat[idx[0]];
- priv_bit = 1 << idx[1];
+ priv_bit = UINT64CONST(1) << idx[1];
if (ACLITEM_GET_PRIVS(*aidata) & priv_bit)
{