Module Name: src
Committed By: rillig
Date: Sun Jan 9 19:57:14 UTC 2022
Modified Files:
src/usr.bin/make: parse.c
Log Message:
make: add missing printflike annotations to parse.c
Clang is stricter than GCC in checking format string inconsistencies.
Reported by Tobias Nygren.
To generate a diff of this commit:
cvs rdiff -u -r1.648 -r1.649 src/usr.bin/make/parse.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.648 src/usr.bin/make/parse.c:1.649
--- src/usr.bin/make/parse.c:1.648 Sun Jan 9 18:49:28 2022
+++ src/usr.bin/make/parse.c Sun Jan 9 19:57:14 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.648 2022/01/09 18:49:28 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.649 2022/01/09 19:57:14 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -106,7 +106,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.648 2022/01/09 18:49:28 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.649 2022/01/09 19:57:14 rillig Exp $");
/*
* A file being read.
@@ -439,7 +439,7 @@ PrintLocation(FILE *f, const char *fname
FStr_Done(&dir);
}
-static void
+static void MAKE_ATTR_PRINTFLIKE(5, 0)
ParseVErrorInternal(FILE *f, const char *fname, size_t lineno,
ParseErrorLevel type, const char *fmt, va_list ap)
{
@@ -469,7 +469,7 @@ ParseVErrorInternal(FILE *f, const char
PrintStackTrace();
}
-static void
+static void MAKE_ATTR_PRINTFLIKE(4, 5)
ParseErrorInternal(const char *fname, size_t lineno,
ParseErrorLevel type, const char *fmt, ...)
{