diff options
author | Thiago Farina <tfarina@chromium.org> | 2012-11-27 17:59:08 (GMT) |
---|---|---|
committer | Thiago Farina <tfarina@chromium.org> | 2012-11-27 18:01:31 (GMT) |
commit | f93f1309b451f4c00fd0d68b4736130135f6586d (patch) | |
tree | c989a223dd1f374bae1d416fffe1d7f5e2c548e8 /src/ninja.cc | |
parent | 561780e6951f3ce8db44e10b3b8b072755ec8a44 (diff) | |
download | Ninja-f93f1309b451f4c00fd0d68b4736130135f6586d.zip Ninja-f93f1309b451f4c00fd0d68b4736130135f6586d.tar.gz Ninja-f93f1309b451f4c00fd0d68b4736130135f6586d.tar.bz2 |
Fix clang warning.
The return type of CollectTarget() is Node, so we should return NULL in the
failure case instead of false.
src/ninja.cc:188:16: warning: initialization of pointer of type 'Node *' to null from a constant boolean expression [-Wbool-conversion]
return false;
^~~~~
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 560e7d4..38f1d78 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -185,7 +185,7 @@ Node* CollectTarget(State* state, const char* cpath, string* err) { if (first_dependent) { if (node->out_edges().empty()) { *err = "'" + path + "' has no out edge"; - return false; + return NULL; } Edge* edge = node->out_edges()[0]; if (edge->outputs_.empty()) { |