@matheusbsbs / matheus-bagliano / commits / 3cacb9aaf4
Fork 0

progress.c: silence cgcc suggestion about internal linkage

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Reviewed-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Đoàn Trần Công Danh committed Apr 27, 2020 at 21:22 UTC 3cacb9aaf46cef6f9cd9b3a859fcc64416954b56
3 files changed +10 -9
progress.c
+1 -1
@@ -8,6 +8,7 @@
8 * published by the Free Software Foundation.
9 */
10
11 +#define GIT_TEST_PROGRESS_ONLY
12 #include "cache.h"
13 #include "gettext.h"
14 #include "progress.h"
@@ -52,7 +53,6 @@ static volatile sig_atomic_t progress_update;
53 */
54 int progress_testing;
55 uint64_t progress_test_ns = 0;
55 -void progress_test_force_update(void); /* To silence -Wmissing-prototypes */
56 void progress_test_force_update(void)
57 {
58 progress_update = 1;
progress.h
+8
@@ -3,6 +3,14 @@
3
4 struct progress;
5
6 +#ifdef GIT_TEST_PROGRESS_ONLY
7 +
8 +extern int progress_testing;
9 +extern uint64_t progress_test_ns;
10 +void progress_test_force_update(void);
11 +
12 +#endif
13 +
14 void display_throughput(struct progress *progress, uint64_t total);
15 void display_progress(struct progress *progress, uint64_t n);
16 struct progress *start_progress(const char *title, uint64_t total);
t/helper/test-progress.c
+1 -8
@@ -13,20 +13,13 @@
13 *
14 * See 't0500-progress-display.sh' for examples.
15 */
16 +#define GIT_TEST_PROGRESS_ONLY
17 #include "test-tool.h"
18 #include "gettext.h"
19 #include "parse-options.h"
20 #include "progress.h"
21 #include "strbuf.h"
22
22 -/*
23 - * These are defined in 'progress.c', but are not exposed in 'progress.h',
24 - * because they are exclusively for testing.
25 - */
26 -extern int progress_testing;
27 -extern uint64_t progress_test_ns;
28 -void progress_test_force_update(void);
29 -
23 int cmd__progress(int argc, const char **argv)
24 {
25 int total = 0;