[lasem/lasem-0-4] tests: use __atribute__((format)) for lasem_test_html.



commit 6f1e59cc10aa35a2bfb7d6b1dda17b6921c96a39
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 4f882f5..d6e9a65 100644
--- a/tests/lsmtest.c
+++ b/tests/lsmtest.c
@@ -97,8 +97,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;
@@ -377,14 +377,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]