{"thread":{"id":"27019","subject":"[PATCH 4/9] sparse: Fix an \"symbol 'format_subject' not declared\" warning","startedAt":"2011-04-07T18:26:23Z","lastAt":"2011-04-07T18:26:23Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"165367","messageId":"4D9E01CF.5060903@ramsay1.demon.co.uk","threadId":"27019","inReplyTo":null,"subject":"[PATCH 4/9] sparse: Fix an \"symbol 'format_subject' not declared\" warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-04-07T18:26:23Z","receivedAt":"2011-04-07T18:26:23Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn order to fix the warning, we add an extern declaration for this\nfunction to the \"commit.h\" header file, along with all other non-\nstatic functions defined in pretty.c. Also, we remove the function\ndeclaration from builtin/shortlog.c, since it is no longer needed.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n builtin/shortlog.c |    3 ---\n commit.h           |    2 ++\n 2 files changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/builtin/shortlog.c b/builtin/shortlog.c\nindex f5efc67..b6f4b0e 100644\n--- a/builtin/shortlog.c\n+++ b/builtin/shortlog.c\n@@ -29,9 +29,6 @@ static int compare_by_number(const void *a1, const void *a2)\n \t\treturn -1;\n }\n \n-const char *format_subject(struct strbuf *sb, const char *msg,\n-\t\t\t   const char *line_separator);\n-\n static void insert_one_record(struct shortlog *log,\n \t\t\t      const char *author,\n \t\t\t      const char *oneline)\ndiff --git a/commit.h b/commit.h\nindex 4198513..b3c3bb7 100644\n--- a/commit.h\n+++ b/commit.h\n@@ -90,6 +90,8 @@ extern char *logmsg_reencode(const struct commit *commit,\n extern char *reencode_commit_message(const struct commit *commit,\n \t\t\t\t     const char **encoding_p);\n extern void get_commit_format(const char *arg, struct rev_info *);\n+extern const char *format_subject(struct strbuf *sb, const char *msg,\n+\t\t\t\t  const char *line_separator);\n extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);\n extern void format_commit_message(const struct commit *commit,\n \t\t\t\t  const char *format, struct strbuf *sb,\n-- \n1.7.4\n"}]}