diff options
author | Evan Martin <martine@danga.com> | 2011-04-30 22:13:33 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-04-30 22:13:33 (GMT) |
commit | 35150517008ed2af2ed583513bad0c9f1f0d66fd (patch) | |
tree | a803ea6d70accdd1b3407ef59639b5e8d8046139 | |
parent | 746820c0a37fd3ddc6569da045cf39630d538d62 (diff) | |
parent | d9c196c1ad2b008b8f6628ace0f9f9273a2b5d26 (diff) | |
download | Ninja-35150517008ed2af2ed583513bad0c9f1f0d66fd.zip Ninja-35150517008ed2af2ed583513bad0c9f1f0d66fd.tar.gz Ninja-35150517008ed2af2ed583513bad0c9f1f0d66fd.tar.bz2 |
Merge pull request #33 from arnaudgelas/master.
fix compilation error / warning on Mac 10.5
-rw-r--r-- | src/eval_env.h | 2 | ||||
-rw-r--r-- | src/ninja.h | 3 | ||||
-rw-r--r-- | src/parsers.h | 1 | ||||
-rw-r--r-- | src/subprocess.cc | 2 |
4 files changed, 7 insertions, 1 deletions
diff --git a/src/eval_env.h b/src/eval_env.h index b1b63ca..37f7b07 100644 --- a/src/eval_env.h +++ b/src/eval_env.h @@ -22,6 +22,7 @@ using namespace std; /// An interface for a scope for variable (e.g. "$foo") lookups. struct Env { + virtual ~Env() {} virtual string LookupVariable(const string& var) = 0; }; @@ -29,6 +30,7 @@ struct Env { /// as well as a pointer to a parent scope. struct BindingEnv : public Env { BindingEnv() : parent_(NULL) {} + virtual ~BindingEnv() {} virtual string LookupVariable(const string& var); void AddBinding(const string& key, const string& val); diff --git a/src/ninja.h b/src/ninja.h index 5311324..1ff4e32 100644 --- a/src/ninja.h +++ b/src/ninja.h @@ -40,6 +40,8 @@ int ReadFile(const string& path, string* contents, string* err); /// Abstract so it can be mocked out for tests. The real implementation /// is RealDiskInterface. struct DiskInterface { + virtual ~DiskInterface() {} + /// stat() a file, returning the mtime, or 0 if missing and -1 on /// other errors. virtual int Stat(const string& path) = 0; @@ -55,6 +57,7 @@ struct DiskInterface { /// Implementation of DiskInterface that actually hits the disk. struct RealDiskInterface : public DiskInterface { + virtual ~RealDiskInterface() {} virtual int Stat(const string& path); virtual bool MakeDir(const string& path); virtual string ReadFile(const string& path, string* err); diff --git a/src/parsers.h b/src/parsers.h index 31fe8a7..58d2bd7 100644 --- a/src/parsers.h +++ b/src/parsers.h @@ -102,6 +102,7 @@ struct State; /// Parses .ninja files. struct ManifestParser { struct FileReader { + virtual ~FileReader() {} virtual bool ReadFile(const string& path, string* content, string* err) = 0; }; diff --git a/src/subprocess.cc b/src/subprocess.cc index cef0ad3..a4957ad 100644 --- a/src/subprocess.cc +++ b/src/subprocess.cc @@ -154,7 +154,7 @@ void SubprocessSet::DoWork() { } } - int ret = poll(fds.data(), fds.size(), -1); + int ret = poll(&fds.front(), fds.size(), -1); if (ret == -1) { if (errno != EINTR) perror("ninja: poll"); |