]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix format specifiers in test cases on Win32
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 29 Mar 2012 09:41:37 +0000 (10:41 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 4 Apr 2012 13:33:27 +0000 (14:33 +0100)
commitf48de0f161348d0b47743e1411796d4e40160546
tree6f1dd5d5055ed2856dcef9adfb5833859254b4b0
parentea3bc548aca7b4c448b48863120ad35a7337c127
Fix format specifiers in test cases on Win32

Some of the test suites use fprintf with format specifiers
that are not supported on Win32 and are not fixed by gnulib.

The mingw32 compiler also has trouble detecting ssize_t
correctly, complaining that 'ssize_t' does not match
'signed size_t' (which it expects for %zd). Force the
cast to size_t to avoid this problem

* tests/testutils.c, tests/testutils.h: Fix printf
  annotation on virTestResult. Use virVasprintf
  instead of vfprintf
* tests/virhashtest.c: Use VIR_WARN instead of fprintf(stderr).
  Cast to size_t to avoid mingw32 compiler bug

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tests/testutils.c
tests/testutils.h
tests/virhashtest.c