Let Stat() have an err outparam instead of writing to stderr.
authorNico Weber <nicolasweber@gmx.de>
Tue, 31 Mar 2015 15:12:12 +0000 (08:12 -0700)
committerNico Weber <nicolasweber@gmx.de>
Tue, 31 Mar 2015 19:21:57 +0000 (12:21 -0700)
commit3beebde51a2089ecb01820f1428efe0263deaeea
tree55aec535c37434dbe5893e8ed37c69891b6d4b74
parenta88b75d9a9df1b3722ad649ae275d342f3b57b22
Let Stat() have an err outparam instead of writing to stderr.

Also check for Stat() failure in a few more places.

This way, ninja doesn't print two "ninja: error: " lines if stat() fails
during a build.  It also makes it easier to keep the stat tests quiet.
Every caller of Stat() needs to explicitly log the error string if
that's desired.
12 files changed:
src/build.cc
src/build_test.cc
src/clean.cc
src/clean_test.cc
src/disk_interface.cc
src/disk_interface.h
src/disk_interface_test.cc
src/graph.cc
src/manifest_parser_perftest.cc
src/ninja.cc
src/test.cc
src/test.h