From 82e0394d46095dd32d3de8c244ef7b7d5b019b51 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Mon, 9 Oct 2017 02:05:41 +0200 Subject: [PATCH] Fix runtest on Windows Unbuffer the output and fix some compiler warnings. --- runtest.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/runtest.c b/runtest.c index 0d237018..981fd8d9 100644 --- a/runtest.c +++ b/runtest.c @@ -119,8 +119,8 @@ typedef struct } glob_t; #define GLOB_DOOFFS 0 -static int glob(const char *pattern, int flags, - int errfunc(const char *epath, int eerrno), +static int glob(const char *pattern, ATTRIBUTE_UNUSED int flags, + ATTRIBUTE_UNUSED int errfunc(const char *epath, int eerrno), glob_t *pglob) { glob_t *ret; WIN32_FIND_DATA FindFileData; @@ -4523,6 +4523,11 @@ main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED) { int i, a, ret = 0; int subset = 0; +#if defined(_WIN32) && !defined(__CYGWIN__) + setvbuf(stdout, NULL, _IONBF, 0); + setvbuf(stderr, NULL, _IONBF, 0); +#endif + initializeLibxml2(); for (a = 1; a < argc;a++) {