diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-10-05 14:10:29 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-10-05 14:10:29 +1030 |
commit | 0959991a0cae77bd404dee266aaf0667e51a459e (patch) | |
tree | 1ecc80fab0d96f3486005bf0d2caa006677a779f | |
parent | 453fe9b4bb249a6b7e22e4b6c9cebbb881a8733a (diff) |
ccanlint: fix spurious warning errors.
Because we fork children to do compilations, and we use stdio, we need
to flush stdout before the fork otherwise the child will flush
afterwards. The compile tests interpret this output as a compiler
warning.
This shows up if you redirect ccanlint output to a file.
-rw-r--r-- | tools/ccanlint/async.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/ccanlint/async.c b/tools/ccanlint/async.c index 5c2c4da7..ffa18ca8 100644 --- a/tools/ccanlint/async.c +++ b/tools/ccanlint/async.c @@ -51,6 +51,7 @@ static void run_more(void) if (!c) break; + fflush(stdout); if (pipe(p) != 0) err(1, "Pipe failed"); c->pid = fork(); |