diff options
| author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-07-10 10:47:27 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2021-07-12 12:09:53 -0700 |
| commit | 103e02c7001f5c4989d56360c8cfc615f29fc9a7 (patch) | |
| tree | f8a92ec7655274714e2cbe11da04a2083208bddc /builtin/receive-pack.c | |
| parent | d486ca60a51c9cb1fe068803c3f540724e95e83a (diff) | |
| download | git-103e02c7001f5c4989d56360c8cfc615f29fc9a7.tar.gz | |
*.c static functions: don't forward-declare __attribute__
9cf6d3357aa (Add git-index-pack utility, 2005-10-12) and
466dbc42f58 (receive-pack: Send internal errors over side-band #2,
2010-02-10) we added these static functions and forward-declared their
__attribute__((printf)).
I think this may have been to work around some compiler limitation at
the time, but in any case we have a lot of code that uses the briefer
way of declaring these that I'm using here, so if we had any such
issues with compilers we'd have seen them already.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
| -rw-r--r-- | builtin/receive-pack.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index a34742513a..2d1f97e1ca 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -425,9 +425,6 @@ static int proc_receive_ref_matches(struct command *cmd) return 0; } -static void rp_error(const char *err, ...) __attribute__((format (printf, 1, 2))); -static void rp_warning(const char *err, ...) __attribute__((format (printf, 1, 2))); - static void report_message(const char *prefix, const char *err, va_list params) { int sz; @@ -445,6 +442,7 @@ static void report_message(const char *prefix, const char *err, va_list params) xwrite(2, msg, sz); } +__attribute__((format (printf, 1, 2))) static void rp_warning(const char *err, ...) { va_list params; @@ -453,6 +451,7 @@ static void rp_warning(const char *err, ...) va_end(params); } +__attribute__((format (printf, 1, 2))) static void rp_error(const char *err, ...) { va_list params; |
