Skip to content

Commit

Permalink
sparse: Fix an "symbol 'format_subject' not declared" warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ramsay Jones authored and gitster committed Apr 11, 2011
1 parent d27da38 commit c8f1444
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions builtin/shortlog.c
Expand Up @@ -29,9 +29,6 @@ static int compare_by_number(const void *a1, const void *a2)
return -1;
}

const char *format_subject(struct strbuf *sb, const char *msg,
const char *line_separator);

static void insert_one_record(struct shortlog *log,
const char *author,
const char *oneline)
Expand Down
2 changes: 2 additions & 0 deletions commit.h
Expand Up @@ -90,6 +90,8 @@ extern char *logmsg_reencode(const struct commit *commit,
extern char *reencode_commit_message(const struct commit *commit,
const char **encoding_p);
extern void get_commit_format(const char *arg, struct rev_info *);
extern const char *format_subject(struct strbuf *sb, const char *msg,
const char *line_separator);
extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
extern void format_commit_message(const struct commit *commit,
const char *format, struct strbuf *sb,
Expand Down

0 comments on commit c8f1444

Please sign in to comment.