From: Alan Coopersmith Date: Sat, 20 Jul 2013 06:38:46 +0000 (-0700) Subject: Add printf attributes as suggested by gcc -Wmissing-format-attribute X-Git-Tag: submit/tizen/20130910.024842~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F47%2F9447%2F1;p=platform%2Fupstream%2Fxwd.git Add printf attributes as suggested by gcc -Wmissing-format-attribute Change-Id: Ibc927c7f9a64f0060404942c317a194f2f298618 Signed-off-by: Alan Coopersmith --- diff --git a/dsimple.c b/dsimple.c index d2d52a4..38576f7 100644 --- a/dsimple.c +++ b/dsimple.c @@ -314,8 +314,7 @@ Window Window_With_Name( /* * outl: a debugging routine. Flushes stdout then prints a message on stderr * and flushes stderr. Used to print messages when past certain points - * in code so we can tell where we are. Outl may be invoked like - * printf with up to 7 arguments. + * in code so we can tell where we are. Outl may be invoked like printf. */ void outl(const char *msg, ...) @@ -331,7 +330,7 @@ outl(const char *msg, ...) /* - * Standard fatal error routine - call like printf but maximum of 7 arguments. + * Standard fatal error routine - call like printf. * Does not require dpy or screen defined. */ void Fatal_Error(const char *msg, ...) diff --git a/dsimple.h b/dsimple.h index c249b45..b0422bd 100644 --- a/dsimple.h +++ b/dsimple.h @@ -76,5 +76,5 @@ void usage(void) _X_NORETURN; Window Select_Window(Display *, int); Window Window_With_Name(Display *, Window, const char *); -void Fatal_Error(const char *, ...) _X_NORETURN; -void outl(const char *, ...); +void Fatal_Error(const char *, ...) _X_NORETURN _X_ATTRIBUTE_PRINTF(1, 2); +void outl(const char *, ...) _X_ATTRIBUTE_PRINTF(1, 2);