*.[ch]: remove extern from function declarations using spatch
There has been a push to remove extern from function declarations.
Remove some instances of "extern" for function declarations which are
caught by Coccinelle. Note that Coccinelle has some difficulty with
processing functions with `__attribute__` or varargs so some `extern`
declarations are left behind to be dealt with in a future patch.
This was the Coccinelle patch used:
@@
type T;
identifier f;
@@
- extern
T f(...);
and it was run with:
$ git ls-files \*.{c,h} |
grep -v ^compat/ |
xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place
Files under `compat/` are intentionally excluded as some are directly
copied from external sources and we should avoid churning them as much
as possible.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ffac537e6c
commit
554544276a
22
grep.h
22
grep.h
@ -186,17 +186,17 @@ struct grep_opt {
|
||||
void *output_priv;
|
||||
};
|
||||
|
||||
extern void init_grep_defaults(struct repository *);
|
||||
extern int grep_config(const char *var, const char *value, void *);
|
||||
extern void grep_init(struct grep_opt *, struct repository *repo, const char *prefix);
|
||||
void init_grep_defaults(struct repository *);
|
||||
int grep_config(const char *var, const char *value, void *);
|
||||
void grep_init(struct grep_opt *, struct repository *repo, const char *prefix);
|
||||
void grep_commit_pattern_type(enum grep_pattern_type, struct grep_opt *opt);
|
||||
|
||||
extern void append_grep_pat(struct grep_opt *opt, const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t);
|
||||
extern void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);
|
||||
extern void append_header_grep_pattern(struct grep_opt *, enum grep_header_field, const char *);
|
||||
extern void compile_grep_patterns(struct grep_opt *opt);
|
||||
extern void free_grep_patterns(struct grep_opt *opt);
|
||||
extern int grep_buffer(struct grep_opt *opt, char *buf, unsigned long size);
|
||||
void append_grep_pat(struct grep_opt *opt, const char *pat, size_t patlen, const char *origin, int no, enum grep_pat_token t);
|
||||
void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);
|
||||
void append_header_grep_pattern(struct grep_opt *, enum grep_header_field, const char *);
|
||||
void compile_grep_patterns(struct grep_opt *opt);
|
||||
void free_grep_patterns(struct grep_opt *opt);
|
||||
int grep_buffer(struct grep_opt *opt, char *buf, unsigned long size);
|
||||
|
||||
struct grep_source {
|
||||
char *name;
|
||||
@ -226,8 +226,8 @@ void grep_source_load_driver(struct grep_source *gs,
|
||||
|
||||
int grep_source(struct grep_opt *opt, struct grep_source *gs);
|
||||
|
||||
extern struct grep_opt *grep_opt_dup(const struct grep_opt *opt);
|
||||
extern int grep_threads_ok(const struct grep_opt *opt);
|
||||
struct grep_opt *grep_opt_dup(const struct grep_opt *opt);
|
||||
int grep_threads_ok(const struct grep_opt *opt);
|
||||
|
||||
/*
|
||||
* Mutex used around access to the attributes machinery if
|
||||
|
||||
Reference in New Issue
Block a user