* [PATCH] enums: remove trailing ',' after last item in enum
@ 2014-07-02 18:24 Ronnie Sahlberg
2014-07-02 19:58 ` Jonathan Nieder
2014-07-09 14:59 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Ronnie Sahlberg @ 2014-07-02 18:24 UTC (permalink / raw)
To: git; +Cc: Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
---
builtin/clean.c | 2 +-
builtin/tag.c | 2 +-
pretty.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/clean.c b/builtin/clean.c
index 9a91515..27701d2 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -48,7 +48,7 @@ enum color_clean {
CLEAN_COLOR_PROMPT = 2,
CLEAN_COLOR_HEADER = 3,
CLEAN_COLOR_HELP = 4,
- CLEAN_COLOR_ERROR = 5,
+ CLEAN_COLOR_ERROR = 5
};
#define MENU_OPTS_SINGLETON 01
diff --git a/builtin/tag.c b/builtin/tag.c
index c6e8a71..ef76556 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -83,7 +83,7 @@ static int in_commit_list(const struct commit_list *want, struct commit *c)
enum contains_result {
CONTAINS_UNKNOWN = -1,
CONTAINS_NO = 0,
- CONTAINS_YES = 1,
+ CONTAINS_YES = 1
};
/*
diff --git a/pretty.c b/pretty.c
index 4f51287..924bc61 100644
--- a/pretty.c
+++ b/pretty.c
@@ -274,7 +274,7 @@ static void add_rfc822_quoted(struct strbuf *out, const char *s, int len)
enum rfc2047_type {
RFC2047_SUBJECT,
- RFC2047_ADDRESS,
+ RFC2047_ADDRESS
};
static int is_rfc2047_special(char ch, enum rfc2047_type type)
--
2.0.1.442.g7fe6834.dirty
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] enums: remove trailing ',' after last item in enum
2014-07-02 18:24 [PATCH] enums: remove trailing ',' after last item in enum Ronnie Sahlberg
@ 2014-07-02 19:58 ` Jonathan Nieder
2014-07-02 20:08 ` Ronnie Sahlberg
2014-07-09 14:59 ` Junio C Hamano
1 sibling, 1 reply; 4+ messages in thread
From: Jonathan Nieder @ 2014-07-02 19:58 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git
Ronnie Sahlberg wrote:
> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
> ---
> builtin/clean.c | 2 +-
> builtin/tag.c | 2 +-
> pretty.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
Is there some gcc option or other tool that can automatically detect
this kind of problem so the regress/fix cycle doesn't have to repeat
too many times?
Looks like v1.7.2-rc0~32^2~16 (2010-03-14) and v1.7.4.2~34 (2011-03-16)
tried to fix this in the past.
Using the test from v1.7.4.2~34 also finds enums with trailing comma
in
grep.h
log-tree.c
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] enums: remove trailing ',' after last item in enum
2014-07-02 19:58 ` Jonathan Nieder
@ 2014-07-02 20:08 ` Ronnie Sahlberg
0 siblings, 0 replies; 4+ messages in thread
From: Ronnie Sahlberg @ 2014-07-02 20:08 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git
GCC can check/error for this with
--pedantic -Werror
On Wed, Jul 2, 2014 at 12:58 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> Ronnie Sahlberg wrote:
>
>> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
>> ---
>> builtin/clean.c | 2 +-
>> builtin/tag.c | 2 +-
>> pretty.c | 2 +-
>> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> Is there some gcc option or other tool that can automatically detect
> this kind of problem so the regress/fix cycle doesn't have to repeat
> too many times?
>
> Looks like v1.7.2-rc0~32^2~16 (2010-03-14) and v1.7.4.2~34 (2011-03-16)
> tried to fix this in the past.
>
> Using the test from v1.7.4.2~34 also finds enums with trailing comma
> in
>
> grep.h
> log-tree.c
>
> Thanks,
> Jonathan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] enums: remove trailing ',' after last item in enum
2014-07-02 18:24 [PATCH] enums: remove trailing ',' after last item in enum Ronnie Sahlberg
2014-07-02 19:58 ` Jonathan Nieder
@ 2014-07-09 14:59 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2014-07-09 14:59 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: git
Ronnie Sahlberg <sahlberg@google.com> writes:
> Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
> ---
Looks good; thanks.
> builtin/clean.c | 2 +-
> builtin/tag.c | 2 +-
> pretty.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/builtin/clean.c b/builtin/clean.c
> index 9a91515..27701d2 100644
> --- a/builtin/clean.c
> +++ b/builtin/clean.c
> @@ -48,7 +48,7 @@ enum color_clean {
> CLEAN_COLOR_PROMPT = 2,
> CLEAN_COLOR_HEADER = 3,
> CLEAN_COLOR_HELP = 4,
> - CLEAN_COLOR_ERROR = 5,
> + CLEAN_COLOR_ERROR = 5
> };
>
> #define MENU_OPTS_SINGLETON 01
> diff --git a/builtin/tag.c b/builtin/tag.c
> index c6e8a71..ef76556 100644
> --- a/builtin/tag.c
> +++ b/builtin/tag.c
> @@ -83,7 +83,7 @@ static int in_commit_list(const struct commit_list *want, struct commit *c)
> enum contains_result {
> CONTAINS_UNKNOWN = -1,
> CONTAINS_NO = 0,
> - CONTAINS_YES = 1,
> + CONTAINS_YES = 1
> };
>
> /*
> diff --git a/pretty.c b/pretty.c
> index 4f51287..924bc61 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -274,7 +274,7 @@ static void add_rfc822_quoted(struct strbuf *out, const char *s, int len)
>
> enum rfc2047_type {
> RFC2047_SUBJECT,
> - RFC2047_ADDRESS,
> + RFC2047_ADDRESS
> };
>
> static int is_rfc2047_special(char ch, enum rfc2047_type type)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-09 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-02 18:24 [PATCH] enums: remove trailing ',' after last item in enum Ronnie Sahlberg
2014-07-02 19:58 ` Jonathan Nieder
2014-07-02 20:08 ` Ronnie Sahlberg
2014-07-09 14:59 ` Junio C Hamano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.