pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Tweak __attribute__-wrapping macros for better pgindent results.
Date: Thu, 26 Mar 2015 18:03:40 +0000
Message-ID: <E1YbC84-0001RF-6u@gemulon.postgresql.org> (raw )
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Tweak __attribute__-wrapping macros for better pgindent results.
This improves on commit bbfd7edae5aa5ad5553d3c7e102f2e450d4380d4 by
making two simple changes:
* pg_attribute_noreturn now takes parentheses, ie pg_attribute_noreturn().
Likewise pg_attribute_unused(), pg_attribute_packed(). This reduces
pgindent's tendency to misformat declarations involving them.
* attributes are now always attached to function declarations, not
definitions. Previously some places were taking creative shortcuts,
which were not merely candidates for bad misformatting by pgindent
but often were outright wrong anyway. (It does little good to put a
noreturn annotation where callers can't see it.) In any case, if
we would like to believe that these macros can be used with non-gcc
compilers, we should avoid gratuitous variance in usage patterns.
I also went through and manually improved the formatting of a lot of
declarations, and got rid of excessively repetitive (and now obsolete
anyway) comments informing the reader what pg_attribute_printf is for.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/785941cdc359c6e595201ffb0df9d28f3f7173a4
Modified Files
--------------
contrib/cube/cube.c | 5 --
contrib/cube/cubedata.h | 9 +++
contrib/cube/cubeparse.y | 5 --
contrib/cube/cubescan.l | 10 +--
contrib/pg_upgrade/pg_upgrade.h | 33 +++-----
contrib/pg_upgrade/util.c | 7 +-
contrib/pg_xlogdump/pg_xlogdump.c | 4 +-
contrib/pgcrypto/px.h | 4 +-
contrib/seg/seg.c | 10 ---
contrib/seg/segdata.h | 12 +++
contrib/seg/segparse.y | 8 +-
contrib/seg/segscan.l | 10 +--
src/backend/access/transam/xlogreader.c | 6 +-
src/backend/postmaster/autovacuum.c | 4 +-
src/backend/postmaster/pgarch.c | 2 +-
src/backend/postmaster/pgstat.c | 2 +-
src/backend/postmaster/postmaster.c | 4 +-
src/backend/postmaster/syslogger.c | 2 +-
src/backend/replication/repl_scanner.l | 2 +-
src/backend/replication/walsender.c | 2 +-
src/backend/utils/error/elog.c | 6 +-
src/backend/utils/misc/guc.c | 5 +-
src/bin/pg_ctl/pg_ctl.c | 6 +-
src/bin/pg_dump/parallel.c | 6 +-
src/bin/pg_dump/pg_backup.h | 5 +-
src/bin/pg_dump/pg_backup_utils.h | 14 +---
src/bin/pg_rewind/logging.h | 6 +-
src/bin/psql/common.h | 5 +-
src/bin/psql/large_obj.c | 4 +-
src/include/bootstrap/bootstrap.h | 4 +-
src/include/c.h | 24 +++---
src/include/common/fe_memutils.h | 8 +-
src/include/lib/stringinfo.h | 9 +--
src/include/mb/pg_wchar.h | 4 +-
src/include/parser/parse_relation.h | 4 +-
src/include/parser/scanner.h | 2 +-
src/include/pgstat.h | 2 +-
src/include/port.h | 20 +----
src/include/postgres.h | 2 +-
src/include/postmaster/autovacuum.h | 4 +-
src/include/postmaster/bgworker_internals.h | 2 +-
src/include/postmaster/bgwriter.h | 4 +-
src/include/postmaster/pgarch.h | 2 +-
src/include/postmaster/postmaster.h | 4 +-
src/include/postmaster/startup.h | 2 +-
src/include/postmaster/syslogger.h | 2 +-
src/include/postmaster/walwriter.h | 2 +-
src/include/replication/walreceiver.h | 2 +-
src/include/replication/walsender_private.h | 2 +-
src/include/storage/ipc.h | 2 +-
src/include/storage/itemptr.h | 2 +-
src/include/storage/lock.h | 2 +-
src/include/tcop/tcopprot.h | 6 +-
src/include/utils/datetime.h | 2 +-
src/include/utils/elog.h | 113 +++++++--------------------
src/include/utils/help_config.h | 2 +-
src/include/utils/palloc.h | 8 +-
src/interfaces/ecpg/include/ecpglib.h | 4 +-
src/interfaces/ecpg/preproc/ecpg.header | 4 +-
src/interfaces/ecpg/preproc/extern.h | 2 +-
src/interfaces/libpq/libpq-int.h | 13 +--
src/interfaces/libpq/pqexpbuffer.c | 4 +-
src/interfaces/libpq/pqexpbuffer.h | 10 +--
src/interfaces/libpq/win32.c | 4 +-
src/pl/plperl/plperl.h | 2 +-
src/pl/plpgsql/src/pl_scanner.c | 2 +-
src/pl/plpgsql/src/plpgsql.h | 2 +-
src/pl/plpython/plpy_elog.h | 15 +---
src/test/modules/test_shm_mq/test_shm_mq.h | 2 +-
src/test/modules/worker_spi/worker_spi.c | 2 +-
src/test/regress/pg_regress.c | 18 +----
71 files changed, 168 insertions(+), 356 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Message-ID: <E1YbC84-0001RF-6u@gemulon.postgresql.org>
Permalink: ../E1YbC84-0001RF-6u@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1YbC84-0001RF-6u@gemulon.postgresql.org
copy link · copy postgr.es
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Tweak __attribute__-wrapping macros for better pgindent results.
In-Reply-To: <E1YbC84-0001RF-6u@gemulon.postgresql.org>
References: <E1YbC84-0001RF-6u@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox