diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-08-18 19:01:40 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-08-18 19:01:40 -0400 |
commit | 232720be9b6412ec2b6bee405299bcbbbe700f0b (patch) | |
tree | ae0c50c6893726b7f8c82a6f4ea8477a82d64fb5 /src/backend/utils | |
parent | 5f110933e1145ad40116cf3c67a454cb6cb71cc2 (diff) | |
download | postgresql-232720be9b6412ec2b6bee405299bcbbbe700f0b.tar.gz postgresql-232720be9b6412ec2b6bee405299bcbbbe700f0b.zip |
Fix incidental warnings from cpluspluscheck.
Remove use of "register" keyword in hashfn.c. It's obsolescent
according to recent C++ compilers, and no modern C compiler pays
much attention to it either.
Also fix one cosmetic warning about signed vs unsigned comparison.
Discussion: https://postgr.es/m/20518.1559494394@sss.pgh.pa.us
Diffstat (limited to 'src/backend/utils')
-rw-r--r-- | src/backend/utils/hash/hashfn.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/hash/hashfn.c b/src/backend/utils/hash/hashfn.c index 66985cc2e92..b8ecd75adc8 100644 --- a/src/backend/utils/hash/hashfn.c +++ b/src/backend/utils/hash/hashfn.c @@ -145,9 +145,9 @@ * well mixed than c, however. */ Datum -hash_any(register const unsigned char *k, register int keylen) +hash_any(const unsigned char *k, int keylen) { - register uint32 a, + uint32 a, b, c, len; @@ -160,7 +160,7 @@ hash_any(register const unsigned char *k, register int keylen) if (((uintptr_t) k & UINT32_ALIGN_MASK) == 0) { /* Code path for aligned source data */ - register const uint32 *ka = (const uint32 *) k; + const uint32 *ka = (const uint32 *) k; /* handle most of the key */ while (len >= 12) @@ -371,10 +371,10 @@ hash_any(register const unsigned char *k, register int keylen) * Returns a uint64 value. Otherwise similar to hash_any. */ Datum -hash_any_extended(register const unsigned char *k, register int keylen, +hash_any_extended(const unsigned char *k, int keylen, uint64 seed) { - register uint32 a, + uint32 a, b, c, len; @@ -400,7 +400,7 @@ hash_any_extended(register const unsigned char *k, register int keylen, if (((uintptr_t) k & UINT32_ALIGN_MASK) == 0) { /* Code path for aligned source data */ - register const uint32 *ka = (const uint32 *) k; + const uint32 *ka = (const uint32 *) k; /* handle most of the key */ while (len >= 12) @@ -612,7 +612,7 @@ hash_any_extended(register const unsigned char *k, register int keylen, Datum hash_uint32(uint32 k) { - register uint32 a, + uint32 a, b, c; @@ -633,7 +633,7 @@ hash_uint32(uint32 k) Datum hash_uint32_extended(uint32 k, uint64 seed) { - register uint32 a, + uint32 a, b, c; |