Remove useless casts in format arguments
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-12-09T06:33:08Z
Releases:
19 (unreleased)
Remove useless casts in format arguments There were a number of useless casts in format arguments, either where the input to the cast was already in the right type, or seemingly uselessly casting between types instead of just using the right format placeholder to begin with. Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/07fa29f9-42d7-4aac-8834-197918cbbab6%40eisentraut.org
Files
| Path | Change | +/− |
|---|---|---|
| contrib/amcheck/verify_heapam.c | modified | +36 −36 |
| src/backend/access/common/printtup.c | modified | +1 −1 |
| src/backend/access/rmgrdesc/gindesc.c | modified | +1 −1 |
| src/backend/access/transam/xact.c | modified | +3 −3 |
| src/backend/access/transam/xlogreader.c | modified | +13 −13 |
| src/backend/commands/copyfromparse.c | modified | +1 −1 |
| src/backend/commands/define.c | modified | +1 −1 |
| src/backend/libpq/auth.c | modified | +2 −2 |
| src/backend/libpq/pqcomm.c | modified | +3 −3 |
| src/backend/libpq/pqmq.c | modified | +1 −1 |
| src/backend/parser/parse_type.c | modified | +1 −1 |
| src/backend/replication/walreceiver.c | modified | +2 −2 |
| src/backend/storage/page/bufpage.c | modified | +2 −2 |
| src/backend/utils/adt/format_type.c | modified | +1 −1 |
| src/backend/utils/adt/tsvector.c | modified | +3 −3 |
| src/backend/utils/adt/xid.c | modified | +2 −2 |
| src/bin/pgbench/pgbench.c | modified | +2 −2 |
| src/bin/pg_ctl/pg_ctl.c | modified | +12 −13 |
| src/bin/psql/common.c | modified | +1 −1 |
Discussion
- Remove unnecessary casts in printf format arguments 3 messages · 2025-12-04 → 2025-12-09