summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArnaud Gelas <arnaud_gelas@hms.harvard.edu>2011-04-30 12:39:48 (GMT)
committerArnaud Gelas <arnaud_gelas@hms.harvard.edu>2011-04-30 12:49:47 (GMT)
commitd9c196c1ad2b008b8f6628ace0f9f9273a2b5d26 (patch)
tree32c23b9e97b85057bf8d03205b1dd7ebcff9d7a4 /src
parent13adc40187c21ef1dbba0b46cc865ebdfa2ab4ea (diff)
downloadNinja-d9c196c1ad2b008b8f6628ace0f9f9273a2b5d26.zip
Ninja-d9c196c1ad2b008b8f6628ace0f9f9273a2b5d26.tar.gz
Ninja-d9c196c1ad2b008b8f6628ace0f9f9273a2b5d26.tar.bz2
fix warnings on Mac 10.5
structures had virtual functions but not virtual destructors
Diffstat (limited to 'src')
-rw-r--r--src/eval_env.h2
-rw-r--r--src/ninja.h3
-rw-r--r--src/parsers.h1
3 files changed, 6 insertions, 0 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;
};