aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-03 16:26:15 +0900
committerShinichiro Hamaji <shinichiro.hamaji@gmail.com>2015-07-03 16:26:15 +0900
commit8d503017f7fdb54fb6b522e0415751d7e172662f (patch)
tree52b672fd7084f7cce9312070cddf4d3ba0c33d22
parentfad83c5bcd2c0a84a8408717acfc795d7518b4e3 (diff)
downloadandroid_build_kati-8d503017f7fdb54fb6b522e0415751d7e172662f.tar.gz
android_build_kati-8d503017f7fdb54fb6b522e0415751d7e172662f.tar.bz2
android_build_kati-8d503017f7fdb54fb6b522e0415751d7e172662f.zip
[C++] Suppress warnings
-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