From bfeb3806ba63c1a8f31299a500f52e1e7c97868e Mon Sep 17 00:00:00 2001 From: Amir Zaim Mohd Zaini Date: Mon, 9 Dec 2013 21:55:03 +0800 Subject: [PATCH] Update buildfix for Clang 3.4 Adding the wrapper to avoid warning "-Wtautological-compare": #ifdef clang-3.4 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtautological-compare" //used to avoid warning, force compiler to accept it. #endif clang-3.4 $Code_Content_Here #ifdef clang-3.4 #pragma GCC diagnostic pop #endif clang-3.4 Tested on both GCC and Clang compilers and none of these compilers have this problem. --- ext/disarm.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ext/disarm.cpp b/ext/disarm.cpp index c41fa74abb..005cb024c8 100644 --- a/ext/disarm.cpp +++ b/ext/disarm.cpp @@ -60,6 +60,12 @@ * (Thanks to Vincent Zweije for reporting this.) */ +#ifdef clang-3.4 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wtautological-compare" //used to avoid warning, force compiler to accept it. +#endif clang-3.4 + + #include #include #include @@ -1046,4 +1052,9 @@ void ArmDis(unsigned int addr, unsigned int w, char *output, bool includeWord) { *output = ' '; output++; } -} \ No newline at end of file +} + +#ifdef clang-3.4 +#pragma GCC diagnostic pop +#endif clang-3.4 +