]> git.ipfire.org Git - thirdparty/git.git/commitdiff
__attribute__: remove redundant attribute declaration for git_die_config()
authorJunio C Hamano <gitster@pobox.com>
Sat, 8 Jun 2024 18:37:45 +0000 (11:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Jun 2024 16:16:30 +0000 (09:16 -0700)
The convention is to declare the function attribute to an extern
function together with its declaration in the header file, without
repeating the attribute declaration with its definition in the .c
source file (a file-scope static function declares its attribute
together with its definition in the .c file it is defined, as there
is no other place to do so).

The definition of git_die_config() in config.c did not follow the
convention and had its attribute declared with both its declaration
in the header and its definition in the .c source file.

Remove the one in the config.c to match everybody else.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c

index ae3652b08fa6f36af6c085e36b89efdd46d72389..2766b149a0537ee2cbcdfc0632704d2158c370fd 100644 (file)
--- a/config.c
+++ b/config.c
@@ -2822,7 +2822,6 @@ void git_die_config_linenr(const char *key, const char *filename, int linenr)
                    key, filename, linenr);
 }
 
-NORETURN __attribute__((format(printf, 2, 3)))
 void git_die_config(const char *key, const char *err, ...)
 {
        const struct string_list *values;