aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dep.cc2
-rw-r--r--eval.cc1
-rw-r--r--exec.cc2
-rw-r--r--log.h3
4 files changed, 6 insertions, 2 deletions
diff --git a/dep.cc b/dep.cc
index 7416774..9657a8a 100644
--- a/dep.cc
+++ b/dep.cc
@@ -399,7 +399,7 @@ class DepBuilder {
return rule.get();
}
- DepNode* BuildPlan(Symbol output, Symbol needed_by) {
+ DepNode* BuildPlan(Symbol output, Symbol needed_by UNUSED) {
LOG("BuildPlan: %s for %s",
output.c_str(),
needed_by.c_str());
diff --git a/eval.cc b/eval.cc
index 69339e4..a93d307 100644
--- a/eval.cc
+++ b/eval.cc
@@ -199,6 +199,7 @@ void Evaluator::EvalIf(const IfAST* ast) {
}
default:
CHECK(false);
+ abort();
}
const vector<AST*>* asts;
diff --git a/exec.cc b/exec.cc
index 056318e..c5b7b19 100644
--- a/exec.cc
+++ b/exec.cc
@@ -44,7 +44,7 @@ class Executor {
: ce_(ev) {
}
- void ExecNode(DepNode* n, DepNode* needed_by) {
+ void ExecNode(DepNode* n, DepNode* needed_by UNUSED) {
if (done_[n->output])
return;
done_[n->output] = true;
diff --git a/log.h b/log.h
index c230217..702af1b 100644
--- a/log.h
+++ b/log.h
@@ -28,6 +28,9 @@ using namespace std;
extern bool g_log_no_exit;
extern string* g_last_error;
+// Useful for logging-only arguments.
+#define UNUSED __attribute__((unused))
+
#ifdef NOLOG
#define LOG(args...)
#else