Skip to content

Commit

Permalink
enums: omit trailing comma for portability
Browse files Browse the repository at this point in the history
Since v1.7.2-rc0~23^2~2 (Add per-repository eol normalization,
2010-05-19), building with gcc -std=gnu89 -pedantic produces warnings
like the following:

 convert.c:21:11: warning: comma at end of enumerator list [-pedantic]

gcc is right to complain --- these commas are not permitted in C89.
In the spirit of v1.7.2-rc0~32^2~16 (2010-05-14), remove them.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Mar 16, 2011
1 parent ea2c69e commit c9b6782
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ extern enum safe_crlf safe_crlf;
enum auto_crlf {
AUTO_CRLF_FALSE = 0,
AUTO_CRLF_TRUE = 1,
AUTO_CRLF_INPUT = -1,
AUTO_CRLF_INPUT = -1
};

extern enum auto_crlf auto_crlf;
Expand Down
2 changes: 1 addition & 1 deletion convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ enum action {
CRLF_TEXT,
CRLF_INPUT,
CRLF_CRLF,
CRLF_AUTO,
CRLF_AUTO
};

struct text_stat {
Expand Down

0 comments on commit c9b6782

Please sign in to comment.