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>
This commit is contained in:
Đoàn Trần Công Danh 2020-04-27 21:22:37 +07:00 коммит произвёл Junio C Hamano
Родитель 9d2152d3db
Коммит 3cacb9aaf4
3 изменённых файлов: 10 добавлений и 9 удалений

Просмотреть файл

@ -8,6 +8,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#define GIT_TEST_PROGRESS_ONLY
#include "cache.h" #include "cache.h"
#include "gettext.h" #include "gettext.h"
#include "progress.h" #include "progress.h"
@ -52,7 +53,6 @@ static volatile sig_atomic_t progress_update;
*/ */
int progress_testing; int progress_testing;
uint64_t progress_test_ns = 0; uint64_t progress_test_ns = 0;
void progress_test_force_update(void); /* To silence -Wmissing-prototypes */
void progress_test_force_update(void) void progress_test_force_update(void)
{ {
progress_update = 1; progress_update = 1;

Просмотреть файл

@ -3,6 +3,14 @@
struct progress; struct progress;
#ifdef GIT_TEST_PROGRESS_ONLY
extern int progress_testing;
extern uint64_t progress_test_ns;
void progress_test_force_update(void);
#endif
void display_throughput(struct progress *progress, uint64_t total); void display_throughput(struct progress *progress, uint64_t total);
void display_progress(struct progress *progress, uint64_t n); void display_progress(struct progress *progress, uint64_t n);
struct progress *start_progress(const char *title, uint64_t total); struct progress *start_progress(const char *title, uint64_t total);

Просмотреть файл

@ -13,20 +13,13 @@
* *
* See 't0500-progress-display.sh' for examples. * See 't0500-progress-display.sh' for examples.
*/ */
#define GIT_TEST_PROGRESS_ONLY
#include "test-tool.h" #include "test-tool.h"
#include "gettext.h" #include "gettext.h"
#include "parse-options.h" #include "parse-options.h"
#include "progress.h" #include "progress.h"
#include "strbuf.h" #include "strbuf.h"
/*
* These are defined in 'progress.c', but are not exposed in 'progress.h',
* because they are exclusively for testing.
*/
extern int progress_testing;
extern uint64_t progress_test_ns;
void progress_test_force_update(void);
int cmd__progress(int argc, const char **argv) int cmd__progress(int argc, const char **argv)
{ {
int total = 0; int total = 0;