summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voß <thomas.voss.bochum@gmail.com>2015-11-25 14:23:13 +0100
committerThomas Voß <thomas.voss.bochum@gmail.com>2015-11-25 14:23:13 +0100
commit3f786c717166df45409f631963a141f39a670af5 (patch)
tree8752099fccbe3dd60f4e0ca271af29658056b266 /src
parent146533e377ad5ae205a52d37f98771da3f39a547 (diff)
downloadqtlocation-mapboxgl-3f786c717166df45409f631963a141f39a670af5.tar.gz
Fix GCC5 complaining about -Wunused-variable.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/compression.cpp3
-rw-r--r--src/mbgl/util/uv.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/util/compression.cpp b/src/mbgl/util/compression.cpp
index 139dba7546..2ca11e3ad5 100644
--- a/src/mbgl/util/compression.cpp
+++ b/src/mbgl/util/compression.cpp
@@ -6,6 +6,8 @@
#include <cstring>
#include <stdexcept>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
// Check zlib library version.
const static bool zlibVersionCheck = []() {
@@ -20,6 +22,7 @@ const static bool zlibVersionCheck = []() {
return true;
}();
+#pragma GCC diagnostic pop
namespace mbgl {
namespace util {
diff --git a/src/mbgl/util/uv.cpp b/src/mbgl/util/uv.cpp
index 353d6ccc91..c8181e0e36 100644
--- a/src/mbgl/util/uv.cpp
+++ b/src/mbgl/util/uv.cpp
@@ -4,12 +4,15 @@
#include <uv.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-variable"
// Check libuv library version.
const static bool uvVersionCheck = []() {
const unsigned int version = uv_version();
const unsigned int major = (version >> 16) & 0xFF;
const unsigned int minor = (version >> 8) & 0xFF;
const unsigned int patch = version & 0xFF;
+#pragma GCC diagnostic pop
#ifndef UV_VERSION_PATCH
// 0.10 doesn't have UV_VERSION_PATCH defined, so we "fake" it by using the library patch level.