Signed vs. Unsigned (some)
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2021-06-12T02:05:29Z
Lists: pgsql-hackers
Attachments
- fix_signed_vs_unsigned.patch (application/octet-stream) patch
Hi, Removing legitimate warnings can it be worth it? -1 CAST can be wrong, when there is an invalid value defined (InvalidBucket, InvalidBlockNumber). I think depending on the compiler -1 CAST may be different from InvalidBucket or InvalidBlockNumber. pg_rewind is one special case. All cases of XLogSegNo (uint64) initialization are zero, but in pg_rewind was used -1? I did not find it InvalidXLogSegNo! Not tested. Trivial patch attached. best regards, Ranier Vilela
Commits
-
Silence minor compiler warnings.
- 302612a6c74f 15.0 cited
-
Use InvalidBucket instead of -1 where appropriate
- 6bd3ec62d9d7 15.0 landed
-
Set pg_class.reltuples for partitioned tables
- 0e69f705cc1a 14.0 cited
-
Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE.
- 3d351d916b20 14.0 cited