pgsql: Suppress -Wshift-negative-value warnings. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Suppress -Wshift-negative-value warnings.
Date
Msg-id E1fUe59-0006Ep-HH@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: Fix memory leak in PLySequence_ToJsonbValue()
Next
From: Michael Paquier
Date:
Subject: pgsql: Prevent hard failures of standbys caused by recycled WALsegment