Skip to content

Commit c8f1444

Browse files
Ramsay Jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d27da38 commit c8f1444

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

builtin/shortlog.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ static int compare_by_number(const void *a1, const void *a2)
2929
return -1;
3030
}
3131

32-
const char *format_subject(struct strbuf *sb, const char *msg,
33-
const char *line_separator);
34-
3532
static void insert_one_record(struct shortlog *log,
3633
const char *author,
3734
const char *oneline)

commit.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ extern char *logmsg_reencode(const struct commit *commit,
9090
extern char *reencode_commit_message(const struct commit *commit,
9191
const char **encoding_p);
9292
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);
9395
extern void userformat_find_requirements(const char *fmt, struct userformat_want *w);
9496
extern void format_commit_message(const struct commit *commit,
9597
const char *format, struct strbuf *sb,

0 commit comments

Comments
 (0)