Skip to content

Commit d165ac4

Browse files
committed
Merge branch 'dl/no-extern-in-func-decl' into next
Mechanically and systematically drop "extern" from function declarlation. * dl/no-extern-in-func-decl: *.[ch]: manually align parameter lists *.[ch]: remove extern from function declarations using sed *.[ch]: remove extern from function declarations using spatch
2 parents 4f8e8b0 + ad6dad0 commit d165ac4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1082
-1082
lines changed

advice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int git_default_advice_config(const char *var, const char *value);
3232
__attribute__((format (printf, 1, 2)))
3333
void advise(const char *advice, ...);
3434
int error_resolve_conflict(const char *me);
35-
extern void NORETURN die_resolve_conflict(const char *me);
35+
void NORETURN die_resolve_conflict(const char *me);
3636
void NORETURN die_conclude_merge(void);
3737
void detach_advice(const char *new_name);
3838

archive.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ struct archiver_args {
2323

2424
/* main api */
2525

26-
extern int write_archive(int argc, const char **argv, const char *prefix,
27-
struct repository *repo,
28-
const char *name_hint, int remote);
26+
int write_archive(int argc, const char **argv, const char *prefix,
27+
struct repository *repo,
28+
const char *name_hint, int remote);
2929

3030
const char *archive_format_from_filename(const char *filename);
3131

@@ -39,21 +39,21 @@ struct archiver {
3939
unsigned flags;
4040
void *data;
4141
};
42-
extern void register_archiver(struct archiver *);
42+
void register_archiver(struct archiver *);
4343

44-
extern void init_tar_archiver(void);
45-
extern void init_zip_archiver(void);
46-
extern void init_archivers(void);
44+
void init_tar_archiver(void);
45+
void init_zip_archiver(void);
46+
void init_archivers(void);
4747

4848
typedef int (*write_archive_entry_fn_t)(struct archiver_args *args,
4949
const struct object_id *oid,
5050
const char *path, size_t pathlen,
5151
unsigned int mode);
5252

53-
extern int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
54-
extern void *object_file_to_archive(const struct archiver_args *args,
55-
const char *path, const struct object_id *oid,
56-
unsigned int mode, enum object_type *type,
57-
unsigned long *sizep);
53+
int write_archive_entries(struct archiver_args *args, write_archive_entry_fn_t write_entry);
54+
void *object_file_to_archive(const struct archiver_args *args,
55+
const char *path, const struct object_id *oid,
56+
unsigned int mode, enum object_type *type,
57+
unsigned long *sizep);
5858

5959
#endif /* ARCHIVE_H */

bisect.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ struct repository;
1111
* Otherwise, it will be either all non-SAMETREE commits or the single
1212
* best commit, as chosen by `find_all`.
1313
*/
14-
extern void find_bisection(struct commit_list **list, int *reaches, int *all,
15-
int find_all);
14+
void find_bisection(struct commit_list **list, int *reaches, int *all,
15+
int find_all);
1616

17-
extern struct commit_list *filter_skipped(struct commit_list *list,
18-
struct commit_list **tried,
19-
int show_all,
20-
int *count,
21-
int *skipped_first);
17+
struct commit_list *filter_skipped(struct commit_list *list,
18+
struct commit_list **tried,
19+
int show_all,
20+
int *count,
21+
int *skipped_first);
2222

2323
#define BISECT_SHOW_ALL (1<<0)
2424
#define REV_LIST_QUIET (1<<1)
@@ -31,14 +31,14 @@ struct rev_list_info {
3131
const char *header_prefix;
3232
};
3333

34-
extern int bisect_next_all(struct repository *r,
35-
const char *prefix,
36-
int no_checkout);
34+
int bisect_next_all(struct repository *r,
35+
const char *prefix,
36+
int no_checkout);
3737

38-
extern int estimate_bisect_steps(int all);
38+
int estimate_bisect_steps(int all);
3939

40-
extern void read_bisect_terms(const char **bad, const char **good);
40+
void read_bisect_terms(const char **bad, const char **good);
4141

42-
extern int bisect_clean_state(void);
42+
int bisect_clean_state(void);
4343

4444
#endif

blame.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,6 @@ struct blame_entry *blame_entry_prepend(struct blame_entry *head,
177177
long start, long end,
178178
struct blame_origin *o);
179179

180-
extern struct blame_origin *get_blame_suspects(struct commit *commit);
180+
struct blame_origin *get_blame_suspects(struct commit *commit);
181181

182182
#endif /* BLAME_H */

branch.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ void create_branch(struct repository *r,
5050
* Return 1 if the named branch already exists; return 0 otherwise.
5151
* Fill ref with the full refname for the branch.
5252
*/
53-
extern int validate_branchname(const char *name, struct strbuf *ref);
53+
int validate_branchname(const char *name, struct strbuf *ref);
5454

5555
/*
5656
* Check if a branch 'name' can be created as a new branch; die otherwise.
5757
* 'force' can be used when it is OK for the named branch already exists.
5858
* Return 1 if the named branch already exists; return 0 otherwise.
5959
* Fill ref with the full refname for the branch.
6060
*/
61-
extern int validate_new_branchname(const char *name, struct strbuf *ref, int force);
61+
int validate_new_branchname(const char *name, struct strbuf *ref, int force);
6262

6363
/*
6464
* Remove information about the state of working on the current
@@ -72,26 +72,26 @@ void remove_branch_state(struct repository *r);
7272
* Returns 0 on success.
7373
*/
7474
#define BRANCH_CONFIG_VERBOSE 01
75-
extern int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
75+
int install_branch_config(int flag, const char *local, const char *origin, const char *remote);
7676

7777
/*
7878
* Read branch description
7979
*/
80-
extern int read_branch_desc(struct strbuf *, const char *branch_name);
80+
int read_branch_desc(struct strbuf *, const char *branch_name);
8181

8282
/*
8383
* Check if a branch is checked out in the main worktree or any linked
8484
* worktree and die (with a message describing its checkout location) if
8585
* it is.
8686
*/
87-
extern void die_if_checked_out(const char *branch, int ignore_current_worktree);
87+
void die_if_checked_out(const char *branch, int ignore_current_worktree);
8888

8989
/*
9090
* Update all per-worktree HEADs pointing at the old ref to point the new ref.
9191
* This will be used when renaming a branch. Returns 0 if successful, non-zero
9292
* otherwise.
9393
*/
94-
extern int replace_each_worktree_head_symref(const char *oldref, const char *newref,
95-
const char *logmsg);
94+
int replace_each_worktree_head_symref(const char *oldref, const char *newref,
95+
const char *logmsg);
9696

9797
#endif

0 commit comments

Comments
 (0)