diff options
author | Gil Pitney <gil.pitney@linaro.org> | 2015-01-26 23:20:05 +0000 |
---|---|---|
committer | Gil Pitney <gil.pitney@linaro.org> | 2015-01-26 23:20:05 +0000 |
commit | 1401531bf3c6c31d728e87ee10a1c2469e43942e (patch) | |
tree | ece8bd6bf2648a8d2ead533f73b5f713a54b6232 | |
parent | 591bb48b44e9f722fe343aebc7228a0459cd8b34 (diff) |
LLVM 3.6: Silence the tautological-undefined-compare warning.
Clang and GCC are now complaining about (this == 0) comparisons.
Rather than remove the comparison, keeping it for safety, and just
silencing the warning for this file (src/core/object.cpp) only.
Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
-rw-r--r-- | src/core/object.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/object.cpp b/src/core/object.cpp index be44279..072c61d 100644 --- a/src/core/object.cpp +++ b/src/core/object.cpp @@ -93,9 +93,13 @@ Object::Type Object::type() const return p_type; } +#pragma clang diagnostic ignored "-Wtautological-undefined-compare" +#pragma GCC diagnostic ignored "-Wtautological-undefined-compare" + bool Object::isA(Object::Type type) const { // Check for null values + // NOTE: in clang 3.6+, this warns: we keep the code (as harmless), but suppress the warning. if (this == 0) return false; |