diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2018-10-02 21:45:25 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2018-10-02 21:48:43 +0200 |
commit | e6df2df6c8a6fbc979ed219c8e5dc67e13a7d4d3 (patch) | |
tree | 612d65c6223ccc883bef4bc277e1955945a3e35a | |
parent | 5d8e9896c088d2e5889404f9131dbdbe0ec5b1db (diff) | |
download | ccache-e6df2df6c8a6fbc979ed219c8e5dc67e13a7d4d3.tar.gz |
Remove superfluous “extern” function declarations from a9e8810f
Function declarations are extern by default.
-rw-r--r-- | src/ccache.c | 5 | ||||
-rw-r--r-- | src/compopt.c | 3 | ||||
-rw-r--r-- | unittest/framework.h | 2 | ||||
-rw-r--r-- | unittest/test_compopt.c | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/ccache.c b/src/ccache.c index 6634554b..391c0551 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -33,6 +33,7 @@ #define STRINGIFY(x) #x #define TO_STRING(x) STRINGIFY(x) +// Global variables used by other compilation units. extern struct conf *conf; extern char *primary_config_path; extern char *secondary_config_path; @@ -43,8 +44,6 @@ extern unsigned lock_staleness_limit; static void failed(void) ATTR_NORETURN; static void ccache(int argc, char *argv[]) ATTR_NORETURN; -int ccache_main(int argc, char *argv[]); - static const char VERSION_TEXT[] = MYNAME " version %s\n" "\n" @@ -3657,6 +3656,8 @@ ccache_main_options(int argc, char *argv[]) return 0; } +int ccache_main(int argc, char *argv[]); + int ccache_main(int argc, char *argv[]) { diff --git a/src/compopt.c b/src/compopt.c index b963ce60..cb67d7a7 100644 --- a/src/compopt.c +++ b/src/compopt.c @@ -142,7 +142,8 @@ compopt_short(bool (*fn)(const char *), const char *option) return retval; } -extern bool compopt_verify_sortedness(void); +// Used by unittest/test_compopt.c. +bool compopt_verify_sortedness(void); // For test purposes. bool diff --git a/unittest/framework.h b/unittest/framework.h index 29ff43f1..317c2ca0 100644 --- a/unittest/framework.h +++ b/unittest/framework.h @@ -22,7 +22,7 @@ // ============================================================================ #define TEST_SUITE(name) \ - extern unsigned suite_##name(unsigned _start_point); \ + unsigned suite_##name(unsigned _start_point); \ unsigned suite_##name(unsigned _start_point) \ { \ unsigned _test_counter = 0; \ diff --git a/unittest/test_compopt.c b/unittest/test_compopt.c index 6b581211..263e6497 100644 --- a/unittest/test_compopt.c +++ b/unittest/test_compopt.c @@ -24,7 +24,7 @@ TEST_SUITE(compopt) TEST(option_table_should_be_sorted) { - extern bool compopt_verify_sortedness(void); + bool compopt_verify_sortedness(void); CHECK(compopt_verify_sortedness()); } |