diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-03-26 14:03:19 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-03-26 14:03:25 -0400 |
commit | 785941cdc359c6e595201ffb0df9d28f3f7173a4 (patch) | |
tree | f1cb5a309c53bf1b9112bc51e99c94bfa55f77c7 /contrib/seg/seg.c | |
parent | d04c8ed9044eccebce043143a930617e3998c005 (diff) | |
download | postgresql-785941cdc359c6e595201ffb0df9d28f3f7173a4.tar.gz |
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.
Diffstat (limited to 'contrib/seg/seg.c')
-rw-r--r-- | contrib/seg/seg.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c index 0807e238f1..8e2d5343ae 100644 --- a/contrib/seg/seg.c +++ b/contrib/seg/seg.c @@ -23,15 +23,6 @@ PG_MODULE_MAGIC; -extern int seg_yyparse(SEG *result); -extern void seg_yyerror(SEG *result, const char *message); -extern void seg_scanner_init(const char *str); -extern void seg_scanner_finish(void); - -/* -extern int seg_yydebug; -*/ - /* * Auxiliary data structure for picksplit method. */ @@ -103,7 +94,6 @@ bool seg_different(SEG *a, SEG *b); ** Auxiliary funxtions */ static int restore(char *s, float val, int n); -int significant_digits(char *s); /***************************************************************************** |