@matheusbsbs / matheus-bagliano / commits / c8f1444d9e
Fork 0

sparse: Fix an "symbol 'format_subject' not declared" warning

In order to fix the warning, we add an extern declaration for this function to the "commit.h" header file, along with all other non- static functions defined in pretty.c. Also, we remove the function declaration from builtin/shortlog.c, since it is no longer needed. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramsay Jones committed Apr 7, 2011 at 19:26 UTC c8f1444d9e708e3994c74c180194c43bf1588b65
2 files changed +2 -3
builtin/shortlog.c
-3
@@ -29,9 +29,6 @@ static int compare_by_number(const void *a1, const void *a2)
29 return -1;
30 }
31
32 -const char *format_subject(struct strbuf *sb, const char *msg,
33 - const char *line_separator);
34 -
32 static void insert_one_record(struct shortlog *log,
33 const char *author,
34 const char *oneline)
commit.h
+2
@@ -90,6 +90,8 @@ extern char *logmsg_reencode(const struct commit *commit,
90 extern char *reencode_commit_message(const struct commit *commit,
91 const char **encoding_p);
92 extern void get_commit_format(const char *arg, struct rev_info *);
93 +extern const char *format_subject(struct strbuf *sb, const char *msg,
94 + const char *line_separator);
95 extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
96 extern void format_commit_message(const struct commit *commit,
97 const char *format, struct strbuf *sb,