From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Modernizing pg_bsd_indent's error/warning reporting code
Date: Mon, 15 Jun 2026 12:26:53 -0400
Message-ID: <235695.1781540813@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJTYsWUPaHmx81ejgAP6BL-eT0xe1JzfvQneMMCmPZpcB59n9Q@mail.gmail.com>
References: <1645041.1781283554@sss.pgh.pa.us>
<CAJTYsWUPaHmx81ejgAP6BL-eT0xe1JzfvQneMMCmPZpcB59n9Q@mail.gmail.com>
Ayush Tiwari <ayushtiwari.slg01@gmail.com> writes:
> On Fri, 12 Jun 2026 at 22:29, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This is not an unreasonable suggestion, and presumably more people
>> will start seeing this as they adopt newer clang versions. (I see
>> the same on Fedora 44, for instance.) So I think we ought to take
>> the advice, and while we're at it let's convert this code to use
>> varargs instead of several duplicative functions. Patch attached.
> Patch looks good to me,
Thanks for looking!
> Just a minor comment, while we are at it, should we change
> the %zd to %zu for nitems since it looks like it uses size_t?
Seems reasonable enough. It can't matter functionally, since
the denominators in nitems() are surely at least 2. But it is
indeed customary to print size_t with %zu, so done that way.
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, ayushtiwari.slg01@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Modernizing pg_bsd_indent's error/warning reporting code
In-Reply-To: <235695.1781540813@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox