[PATCH:libXfont 2/4] Add _X_ATTRIBUTE_PRINTF to *Error/*Warning functions taking printf formats

Alan Coopersmith alan.coopersmith at oracle.com
Fri Oct 21 20:56:48 PDT 2011


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 include/X11/fonts/bdfint.h |    4 ++--
 include/X11/fonts/pcf.h    |    2 +-
 src/bitmap/snfread.c       |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/X11/fonts/bdfint.h b/include/X11/fonts/bdfint.h
index c037b99..cc464cb 100644
--- a/include/X11/fonts/bdfint.h
+++ b/include/X11/fonts/bdfint.h
@@ -65,8 +65,8 @@ typedef struct BDFSTAT {
     BOOL        haveDefaultCh;
 }           bdfFileState;
 
-extern void bdfError ( const char * message, ... );
-extern void bdfWarning ( const char *message, ... );
+extern void bdfError ( const char * message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
+extern void bdfWarning ( const char *message, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
 extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf,
 				    int len );
 extern Atom bdfForceMakeAtom ( const char *str, int *size );
diff --git a/include/X11/fonts/pcf.h b/include/X11/fonts/pcf.h
index 3d47c66..ddce0a9 100644
--- a/include/X11/fonts/pcf.h
+++ b/include/X11/fonts/pcf.h
@@ -92,6 +92,6 @@ extern int pcfReadFont ( FontPtr pFont, FontFilePtr file,
 			 int bit, int byte, int glyph, int scan );
 extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file );
 extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file );
-extern void pcfError ( const char *, ... );
+extern void pcfError ( const char *, ... ) _X_ATTRIBUTE_PRINTF(1, 2);
 
 #endif				/* _PCF_H_ */
diff --git a/src/bitmap/snfread.c b/src/bitmap/snfread.c
index 2f51c48..b2b0c67 100644
--- a/src/bitmap/snfread.c
+++ b/src/bitmap/snfread.c
@@ -60,7 +60,7 @@ from The Open Group.
 
 #include <stdarg.h>
 
-static void
+static void _X_ATTRIBUTE_PRINTF(1, 2)
 snfError(const char* message, ...)
 {
     va_list args;
-- 
1.7.3.2



More information about the xorg-devel mailing list