minor fixes after pgindent prototype fixes

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: minor fixes after pgindent prototype fixes
Date: 2019-07-28 01:37:54
Message-ID: 20190728013754.jwcbe5nfyt3533vx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that after

commit 8255c7a5eeba8f1a38b7a431c04909bde4f5e67d
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: 2019-05-22 13:04:48 -0400

Phase 2 pgindent run for v12.

Switch to 2.1 version of pg_bsd_indent. This formats
multiline function declarations "correctly", that is with
additional lines of parameter declarations indented to match
where the first line's left parenthesis is.

Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com

a few prototypes look odd. It appears to be cases where previously the
odd indentation was put to some use, by indenting parameters less:

extern void DefineCustomBoolVariable(
const char *name,
const char *short_desc,
const char *long_desc,
bool *valueAddr,
bool bootValue,
GucContext context,
int flags,
GucBoolCheckHook check_hook,
GucBoolAssignHook assign_hook,
GucShowHook show_hook);

but now that looks odd:

extern void DefineCustomBoolVariable(
const char *name,
const char *short_desc,
const char *long_desc,
bool *valueAddr,
bool bootValue,
GucContext context,
int flags,
GucBoolCheckHook check_hook,
GucBoolAssignHook assign_hook,
GucShowHook show_hook);

Unless somebody protests I'm going to remove the now pretty useless
looking newline in the cases I can find. I used
ack --type cc --type cpp '^[a-zA-Z_].*\(\n'
to find the ones I did. Not sure that catches everything.

Greetings,

Andres Freund

Attachment Content-Type Size
pgindent-newline.diff text/x-diff 11.0 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-07-28 04:09:51 Re: minor fixes after pgindent prototype fixes
Previous Message Tom Lane 2019-07-28 01:33:45 Re: pg_upgrade fails with non-standard ACL