[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparse
Subject: [PATCH] flush stdout when warning
From: Luc Van Oostenryck <luc.vanoostenryck () gmail ! com>
Date: 2017-11-11 16:31:22
Message-ID: 20171111163122.69604-1-luc.vanoostenryck () gmail ! com
[Download RAW message or body]
This is much needed for tools like test-linearize
which output on stderr & stdout and without this patch
error messages and normal output are out-of-sync.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
lib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib.c b/lib.c
index 73e9a2fe6..ac2e8e0ec 100644
--- a/lib.c
+++ b/lib.c
@@ -110,6 +110,7 @@ static void do_warn(const char *type, struct position pos, const char * fmt, va_
vsprintf(buffer, fmt, args);
name = stream_name(pos.stream);
+ fflush(stdout);
fprintf(stderr, "%s:%d:%d: %s%s\n",
name, pos.line, pos.pos, type, buffer);
}
--
2.14.0
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic