diff options
author | Nico Weber <thakis@chromium.org> | 2014-06-25 00:49:22 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-06-25 00:55:07 (GMT) |
commit | 2120c57e611db9d6af03cbe21a0ed814c119d5df (patch) | |
tree | 904d8ea770630ebe9f6545ed76e401840bb51f04 | |
parent | fcca327e0c66dfec49af28f09f94b94ac49c5cb4 (diff) | |
download | Ninja-2120c57e611db9d6af03cbe21a0ed814c119d5df.zip Ninja-2120c57e611db9d6af03cbe21a0ed814c119d5df.tar.gz Ninja-2120c57e611db9d6af03cbe21a0ed814c119d5df.tar.bz2 |
Fix -Wunused-result warning for chdir on linux.
-rw-r--r-- | src/manifest_parser_perftest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/manifest_parser_perftest.cc b/src/manifest_parser_perftest.cc index e40468f..ca62fb2 100644 --- a/src/manifest_parser_perftest.cc +++ b/src/manifest_parser_perftest.cc @@ -16,7 +16,10 @@ // directory. #include <numeric> + +#include <errno.h> #include <stdio.h> +#include <string.h> #ifdef _WIN32 #include "getopt.h" @@ -95,7 +98,8 @@ int main(int argc, char* argv[]) { return 1; } - chdir(kManifestDir); + if (chdir(kManifestDir) < 0) + Fatal("chdir: %s", strerror(errno)); const int kNumRepetitions = 5; vector<int> times; |