Thread: pgsql: Suppress -Wshift-negative-value warnings.

pgsql: Suppress -Wshift-negative-value warnings.

From
Tom Lane
Date:
Suppress -Wshift-negative-value warnings.

Clean up four places that result in compiler warnings when using recent
gcc with this warning class enabled (as seen on buildfarm members
calliphoridae, skink, and others).  In all these places, this is purely
cosmetic, because the shift distance could not be large enough to risk
a change of sign, so there's no chance of implementation-dependent
behavior.  Still, it's easy enough to avoid the warning by casting the
shifted value to unsigned, so let's do that.

Patch HEAD only, this isn't worth a back-patch.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9b53d966847c55fbd2bff63b3e1a1c37fc694071

Modified Files
--------------
src/backend/utils/adt/inet_cidr_ntop.c | 2 +-
src/backend/utils/adt/network.c        | 2 +-
src/backend/utils/adt/varbit.c         | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)