summaryrefslogtreecommitdiff
path: root/src/configparser.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-10-13 19:07:44 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-10-13 19:07:44 +0200
commit9bb839b6a2873a366ac8685c3c8846b6837f85ca (patch)
tree34b4fdfa7ba3419081089790d1665c5abc249719 /src/configparser.cpp
parent44542c1f1acabbf00f8f468f3bb837c5a8b2736e (diff)
parent6935ce2956fed99d5484da90e614b7126e5275d3 (diff)
Merge pull request #933 from SaberUK/insp20+fix-llvm34
Fix various warnings when building with LLVM 3.5.
Diffstat (limited to 'src/configparser.cpp')
-rw-r--r--src/configparser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp
index 825dfc966..94192a71b 100644
--- a/src/configparser.cpp
+++ b/src/configparser.cpp
@@ -390,8 +390,17 @@ bool ParseStack::ParseExec(const std::string& name, int flags, const std::string
bool ConfigTag::readString(const std::string& key, std::string& value, bool allow_lf)
{
+#ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wunknown-pragmas"
+# pragma clang diagnostic ignored "-Wundefined-bool-conversion"
+#endif
+ // TODO: this is undefined behaviour but changing the API is too risky for 2.0.
if (!this)
return false;
+#ifdef __clang__
+# pragma clang diagnostic pop
+#endif
for(std::vector<KeyVal>::iterator j = items.begin(); j != items.end(); ++j)
{
if(j->first != key)