From: Eric Blake Date: Mon, 29 Jul 2013 18:01:19 +0000 (-0600) Subject: tests: consistently use virFilePrintf X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=93ec384b6636f7a62fce23ed0ab4023b65493480;p=libvirt.git tests: consistently use virFilePrintf Commit a2619962 introduced virFilePrintf to work around the fact that gnulib doesn't (yet) provide guarantees about fprintf() vs. %z, which in turn causes all sorts of mingw compilation errors: ../../tests/testutils.c: In function 'virtTestResult': ../../tests/testutils.c:101:9: error: unknown conversion type character 'z' in format [-Werror=format=] fprintf(stderr, "%3zu) %-60s ", testCounter, name); ^ Rather than s/fprintf/virFilePrintf/ (and reformatting loads of lines) across multiple files, it's easier to just hack the entire testsuite to take advantage of our helper function. * tests/testutils.c: s/fprintf/virFilePrintf/ for mingw. Signed-off-by: Eric Blake --- diff --git a/tests/testutils.h b/tests/testutils.h index bf5c701743..73c5f884c1 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -31,6 +31,10 @@ # define EXIT_AM_SKIP 77 /* tell Automake we're skipping a test */ # define EXIT_AM_HARDFAIL 99 /* tell Automake that the framework is broken */ +/* Work around lack of gnulib support for fprintf %z */ +# undef fprintf +# define fprintf virFilePrintf + extern char *progname; extern char *abs_srcdir;