[lasem] tests: use __atribute__((format)) for lasem_test_html.



commit 8092e2d7a70b8b96ab88f425b0ffee9b03948aba
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Sun Jan 6 18:51:33 2013 +0100

    tests: use __atribute__((format)) for lasem_test_html.

 tests/lsmtest.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/lsmtest.c b/tests/lsmtest.c
index db13be7..e9fa1b6 100644
--- a/tests/lsmtest.c
+++ b/tests/lsmtest.c
@@ -103,8 +103,8 @@ typedef struct {
 	unsigned int success_count;
 } Statistic;
 
-static void
-lasem_test_html (const char *fmt, ...)
+static void __attribute__((format(printf,1,2)))
+lasem_test_html (const char *fmt, ...) 
 {
 	va_list va;
 	FILE *file = lasem_test_html_file ? lasem_test_html_file : stdout;
@@ -387,14 +387,14 @@ lasem_test_render (char const *filename, gboolean compare, gboolean dry_run, Sta
 							   0, NULL);
 			g_regex_unref (regex);
 
-			lasem_test_html (filtered_buffer);
+			lasem_test_html ("%s", filtered_buffer);
 
 			g_free (filtered_buffer);
 		}
 
 		if (is_svg) {
 			lasem_test_html ("<object type=\"image/svg+xml\" data=\"");
-			lasem_test_html (filename);
+			lasem_test_html ("%s", filename);
 			lasem_test_html ("\" width=\"%dpx\"/>", width + 2);
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]