[cairo-commit] cairo/test cairo-test.h,1.16,1.17

Carl Worth commit at pdx.freedesktop.org
Mon Jan 9 17:18:14 PST 2006


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv17502/test

Modified Files:
	cairo-test.h 
Log Message:
2006-01-09  Carl Worth  <cworth at cworth.org>

        * test/cairo-test.h: Add printf format attribute to cairo_test_log.


Index: cairo-test.h
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cairo-test.h	15 Dec 2005 03:56:09 -0000	1.16
+++ cairo-test.h	10 Jan 2006 01:18:12 -0000	1.17
@@ -58,6 +58,13 @@
 #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, \etc.)
 #endif
 
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
+#define CAIRO_PRINTF_FORMAT(fmt_index, va_index) \
+	__attribute__((__format__(__printf__, fmt_index, va_index)))
+#else
+#define CAIRO_PRINTF_FORMAT(fmt_index, va_index)
+#endif
+
 typedef enum cairo_test_status {
     CAIRO_TEST_SUCCESS = 0,
     CAIRO_TEST_FAILURE,
@@ -119,7 +126,7 @@
 
 /* Print a message to the log file, ala printf. */
 void
-cairo_test_log (const char *fmt, ...);
+cairo_test_log (const char *fmt, ...) CAIRO_PRINTF_FORMAT(1, 2);
 
 /* Helper functions that take care of finding source images even when
  * building in a non-srcdir manner, (ie. the tests will be run in a



More information about the cairo-commit mailing list