summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-06-25 00:49:22 (GMT)
committerNico Weber <thakis@chromium.org>2014-06-25 00:55:07 (GMT)
commit2120c57e611db9d6af03cbe21a0ed814c119d5df (patch)
tree904d8ea770630ebe9f6545ed76e401840bb51f04 /src
parentfcca327e0c66dfec49af28f09f94b94ac49c5cb4 (diff)
downloadNinja-2120c57e611db9d6af03cbe21a0ed814c119d5df.zip
Ninja-2120c57e611db9d6af03cbe21a0ed814c119d5df.tar.gz
Ninja-2120c57e611db9d6af03cbe21a0ed814c119d5df.tar.bz2
Fix -Wunused-result warning for chdir on linux.
Diffstat (limited to 'src')
-rw-r--r--src/manifest_parser_perftest.cc6
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;