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>
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()) {