From b33ad85fe9190d2ddbddb3422cc06a5a36c0cde6 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 12 Jan 2013 19:33:36 -0800 Subject: Add printf attributes to utils.c printing functions Doesn't find any problems, but clears -Wmissing-format-attribute warnings Signed-off-by: Alan Coopersmith --- utils.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/utils.h b/utils.h index 3969d9c..085c8cb 100644 --- a/utils.h +++ b/utils.h @@ -103,12 +103,12 @@ extern void uFree(Opaque /* ptr */); /***====================================================================***/ extern Boolean uSetErrorFile(const char *name); -extern void uInformation(const char *s, ...); -extern void uAction(const char *s, ...); -extern void uWarning(const char *s, ...); -extern void uError(const char *s, ...); -extern void uFatalError(const char *s, ...); -extern void uInternalError(const char *s, ...); +extern void uInformation(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uAction(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uWarning(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uFatalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); /***====================================================================***/ @@ -153,8 +153,8 @@ extern char *uStringDup(const char * /* s1 */); extern unsigned int DEBUG_VAR; -extern void uDebug(const char *s, ...); -extern void uDebugNOI(const char *s, ...); /* no indent */ +extern void uDebug(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); +extern void uDebugNOI(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2); /* no indent */ extern Boolean uSetDebugFile(const char *name); extern FILE *uDebugFile; @@ -193,7 +193,7 @@ extern int uDebugIndentSize; extern Boolean uSetEntryFile(const char *name); -extern void uEntry(int l, const char *s, ...); +extern void uEntry(int l, const char *s, ...) _X_ATTRIBUTE_PRINTF(2,3); extern void uExit(int l, const char *rtVal); extern int uEntryLevel; -- cgit v1.2.3