diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-12 16:49:35 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-12-12 17:03:12 -0800 |
commit | 7801b3dcd6501e3de93a6d2cee93b2593806e922 (patch) | |
tree | 1df4eaeaa5bee5591ce009fad9ecba4d093c6b61 | |
parent | f68df9dfd2c7ca03c24aaa0a895b7191ecb81e85 (diff) |
Add some printf format attributes suggested by gcc
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | Xext/security.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86.h | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 2 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Xinput.h | 2 | ||||
-rw-r--r-- | hw/xfree86/parser/configProcs.h | 4 |
5 files changed, 6 insertions, 6 deletions
diff --git a/Xext/security.c b/Xext/security.c index 63892aa85..df5bd5822 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -97,7 +97,7 @@ static const Mask SecurityClientMask = DixGetAttrAccess; * Writes the message to the log file if security logging is on. */ -static void +static void _X_ATTRIBUTE_PRINTF(1,2) SecurityAudit(const char *format, ...) { va_list args; diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index f216d5e8c..b711f0555 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -232,7 +232,7 @@ extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen); extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, - const char *format, va_list args); + const char *format, va_list args) _X_ATTRIBUTE_PRINTF(4,0); extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(4,5); extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 94d2b1596..569695c8a 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -552,7 +552,7 @@ xf86DriverlistFromCompile(void) * Print a READABLE ErrorMessage!!! All information that is * available is printed. */ -static void +static void _X_ATTRIBUTE_PRINTF(1,2) xf86ConfigError(const char *msg, ...) { va_list ap; diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h index 909fb57d6..7d96fac78 100644 --- a/hw/xfree86/common/xf86Xinput.h +++ b/hw/xfree86/common/xf86Xinput.h @@ -173,7 +173,7 @@ extern _X_EXPORT void xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format, - va_list args); + va_list args) _X_ATTRIBUTE_PRINTF(4,0); /* xf86Option.c */ extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts); diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h index 114cdfe33..d67acc698 100644 --- a/hw/xfree86/parser/configProcs.h +++ b/hw/xfree86/parser/configProcs.h @@ -95,8 +95,8 @@ int xf86getSubToken(char **comment); int xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec *tab); void xf86unGetToken(int token); char *xf86tokenString(void); -void xf86parseError(const char *format, ...); -void xf86validationError(const char *format, ...); +void xf86parseError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,2); +void xf86validationError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,2); void xf86setSection(const char *section); int xf86getStringToken(xf86ConfigSymTabRec *tab); /* write.c */ |