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>
This commit is contained in:
Alan Coopersmith 2011-12-12 16:49:35 -08:00
parent f68df9dfd2
commit 7801b3dcd6
5 changed files with 6 additions and 6 deletions

View File

@ -97,7 +97,7 @@ static const Mask SecurityClientMask = DixGetAttrAccess;
* Writes the message to the log file if security logging is on. * 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, ...) SecurityAudit(const char *format, ...)
{ {
va_list args; va_list args;

View File

@ -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 xf86SetBlackWhitePixels(ScreenPtr pScreen);
extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable);
extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, 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, extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb,
const char *format, ...) _X_ATTRIBUTE_PRINTF(4,5); const char *format, ...) _X_ATTRIBUTE_PRINTF(4,5);
extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)

View File

@ -552,7 +552,7 @@ xf86DriverlistFromCompile(void)
* Print a READABLE ErrorMessage!!! All information that is * Print a READABLE ErrorMessage!!! All information that is
* available is printed. * available is printed.
*/ */
static void static void _X_ATTRIBUTE_PRINTF(1,2)
xf86ConfigError(const char *msg, ...) xf86ConfigError(const char *msg, ...)
{ {
va_list ap; va_list ap;

View File

@ -173,7 +173,7 @@ extern _X_EXPORT void xf86VIDrvMsgVerb(InputInfoPtr dev,
MessageType type, MessageType type,
int verb, int verb,
const char *format, const char *format,
va_list args); va_list args) _X_ATTRIBUTE_PRINTF(4,0);
/* xf86Option.c */ /* xf86Option.c */
extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts); extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts);

View File

@ -95,8 +95,8 @@ int xf86getSubToken(char **comment);
int xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec *tab); int xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec *tab);
void xf86unGetToken(int token); void xf86unGetToken(int token);
char *xf86tokenString(void); char *xf86tokenString(void);
void xf86parseError(const char *format, ...); void xf86parseError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,2);
void xf86validationError(const char *format, ...); void xf86validationError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,2);
void xf86setSection(const char *section); void xf86setSection(const char *section);
int xf86getStringToken(xf86ConfigSymTabRec *tab); int xf86getStringToken(xf86ConfigSymTabRec *tab);
/* write.c */ /* write.c */