mirror of
https://github.com/git/git
synced 2024-08-27 03:29:21 +00:00
*.c static functions: don't forward-declare __attribute__
9cf6d3357a
(Add git-index-pack utility, 2005-10-12) and466dbc42f5
(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>
This commit is contained in:
parent
d486ca60a5
commit
103e02c700
|
@ -369,9 +369,7 @@ static void parse_pack_header(void)
|
||||||
use(sizeof(struct pack_header));
|
use(sizeof(struct pack_header));
|
||||||
}
|
}
|
||||||
|
|
||||||
static NORETURN void bad_object(off_t offset, const char *format,
|
__attribute__((format (printf, 2, 3)))
|
||||||
...) __attribute__((format (printf, 2, 3)));
|
|
||||||
|
|
||||||
static NORETURN void bad_object(off_t offset, const char *format, ...)
|
static NORETURN void bad_object(off_t offset, const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list params;
|
va_list params;
|
||||||
|
|
|
@ -425,9 +425,6 @@ static int proc_receive_ref_matches(struct command *cmd)
|
||||||
return 0;
|
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)
|
static void report_message(const char *prefix, const char *err, va_list params)
|
||||||
{
|
{
|
||||||
int sz;
|
int sz;
|
||||||
|
@ -445,6 +442,7 @@ static void report_message(const char *prefix, const char *err, va_list params)
|
||||||
xwrite(2, msg, sz);
|
xwrite(2, msg, sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((format (printf, 1, 2)))
|
||||||
static void rp_warning(const char *err, ...)
|
static void rp_warning(const char *err, ...)
|
||||||
{
|
{
|
||||||
va_list params;
|
va_list params;
|
||||||
|
@ -453,6 +451,7 @@ static void rp_warning(const char *err, ...)
|
||||||
va_end(params);
|
va_end(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((format (printf, 1, 2)))
|
||||||
static void rp_error(const char *err, ...)
|
static void rp_error(const char *err, ...)
|
||||||
{
|
{
|
||||||
va_list params;
|
va_list params;
|
||||||
|
|
Loading…
Reference in a new issue