Skip to content

Commit 3cacb9a

Browse files
sgngitster
authored andcommitted
progress.c: silence cgcc suggestion about internal linkage
Signed-off-by: Đoàn Trần Công Danh <[email protected]> Reviewed-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d2152d commit 3cacb9a

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

progress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* published by the Free Software Foundation.
99
*/
1010

11+
#define GIT_TEST_PROGRESS_ONLY
1112
#include "cache.h"
1213
#include "gettext.h"
1314
#include "progress.h"
@@ -52,7 +53,6 @@ static volatile sig_atomic_t progress_update;
5253
*/
5354
int progress_testing;
5455
uint64_t progress_test_ns = 0;
55-
void progress_test_force_update(void); /* To silence -Wmissing-prototypes */
5656
void progress_test_force_update(void)
5757
{
5858
progress_update = 1;

progress.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33

44
struct progress;
55

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+
614
void display_throughput(struct progress *progress, uint64_t total);
715
void display_progress(struct progress *progress, uint64_t n);
816
struct progress *start_progress(const char *title, uint64_t total);

t/helper/test-progress.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,13 @@
1313
*
1414
* See 't0500-progress-display.sh' for examples.
1515
*/
16+
#define GIT_TEST_PROGRESS_ONLY
1617
#include "test-tool.h"
1718
#include "gettext.h"
1819
#include "parse-options.h"
1920
#include "progress.h"
2021
#include "strbuf.h"
2122

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-
3023
int cmd__progress(int argc, const char **argv)
3124
{
3225
int total = 0;

0 commit comments

Comments
 (0)