Browse Source

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.
Rusty Russell 14 years ago
parent
commit
0959991a0c
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tools/ccanlint/async.c

+ 1 - 0
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();