From: Andreas Schneider Date: Mon, 1 Feb 2021 17:30:15 +0000 (+0100) Subject: lib:texpect: Check the format string of err() X-Git-Tag: tevent-0.11.0~1853 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d1eef269a1f56d08aa4456e3bf66622515f5c5e;p=thirdparty%2Fsamba.git lib:texpect: Check the format string of err() error: format string is not a string literal [-Werror,-Wformat-nonliteral] Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/lib/texpect/texpect.c b/lib/texpect/texpect.c index 8c9431e366e..5657efa44d1 100644 --- a/lib/texpect/texpect.c +++ b/lib/texpect/texpect.c @@ -59,6 +59,9 @@ #else const char progname[] = "unknown program"; +static void err(int eval, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 0); +static void errx(int eval, const char *fmt, ...) PRINTF_ATTRIBUTE(2, 0); + static void err(int eval, const char *fmt, ...) { int err_errno = errno;