From 943bae02ad0b64fb4592c21e94fef58837f5546b Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 20 Oct 2001 07:20:30 +0000 Subject: [PATCH] * editcmd.c (sprintf_p): Declare with the printf attribute. Make static. --- edit/ChangeLog | 3 +++ edit/editcmd.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/edit/ChangeLog b/edit/ChangeLog index fa47f2592..41ac56c00 100644 --- a/edit/ChangeLog +++ b/edit/ChangeLog @@ -1,5 +1,8 @@ 2001-10-20 Pavel Roskin + * editcmd.c (sprintf_p): Declare with the printf attribute. + Make static. + * edit.h: Declare edit_printf() with the printf attribute. 2001-10-18 Pavel Roskin diff --git a/edit/editcmd.c b/edit/editcmd.c index c82b5e3b5..e1dbd1e97 100644 --- a/edit/editcmd.c +++ b/edit/editcmd.c @@ -1494,7 +1494,10 @@ long edit_find (long search_start, unsigned char *exp, int *len, long last_byte, /* this function uses the sprintf command to do a vprintf */ /* it takes pointers to arguments instead of the arguments themselves */ -int sprintf_p (char *str, const char *fmt,...) +static int sprintf_p (char *str, const char *fmt,...) + __attribute__ ((format (printf, 2, 3))); + +static int sprintf_p (char *str, const char *fmt,...) { va_list ap; int n;