agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Modernize pg_bsd_indent's error/warning reporting code.
Date: Mon, 15 Jun 2026 16:23:05 +0000
Message-ID: <E1wZA5Z-000RAv-15@gemulon.postgresql.org> (raw)
Modernize pg_bsd_indent's error/warning reporting code.
Late-model clang complains that these functions should be labeled
with "format(printf, 2, 3)", and it's right. But let's go a bit
further and also make use of varargs, to remove duplication and
allow these functions to be used with non-integer input values.
Since no good deed goes unpunished, I had to also adjust a couple
of call sites. They weren't wrong as-is, since the size_t-sized
arguments were coerced to int on the way into diag3(). But
without that, we have to adjust the format strings.
The point of this is to suppress compiler warnings, so back-patch
into branches containing pg_bsd_indent, even though there's no
functional change.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://postgr.es/m/1645041.1781283554@sss.pgh.pa.us
Backpatch-through: 16
Branch
------
REL_18_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6603e81e69e9b7378e2581f436119a7c6cb94cf9
Modified Files
--------------
src/tools/pg_bsd_indent/indent.c | 4 ++--
src/tools/pg_bsd_indent/indent.h | 9 ++++++---
src/tools/pg_bsd_indent/io.c | 43 ++++++----------------------------------
3 files changed, 14 insertions(+), 42 deletions(-)
view thread (4+ messages) latest in thread
Message-ID: <E1wZA5Z-000RAv-15@gemulon.postgresql.org>
Permalink: ../E1wZA5Z-000RAv-15@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wZA5Z-000RAv-15@gemulon.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Modernize pg_bsd_indent's error/warning reporting code.
In-Reply-To: <E1wZA5Z-000RAv-15@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox