Skip to content

Commit 060e776

Browse files
peffgitster
authored andcommitted
remote.c: spell __attribute__ correctly
We want to tell the compiler that error_buf() uses printf()-style arguments via the __attribute__ mechanism, but the original commit (3a429d0), forgot the trailing "__". This happens to work with real GNUC-compatible compilers like gcc and clang, but confuses our fallback macro in git-compat-util.h, which only matches the official name (and thus the build fails on compilers like Visual Studio). Reported-by: Philip Oakley <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 29bc885 commit 060e776

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,7 @@ int branch_merge_matches(struct branch *branch,
17051705
return refname_match(branch->merge[i]->src, refname);
17061706
}
17071707

1708-
__attribute((format (printf,2,3)))
1708+
__attribute__((format (printf,2,3)))
17091709
static const char *error_buf(struct strbuf *err, const char *fmt, ...)
17101710
{
17111711
if (err) {

0 commit comments

Comments
 (0)