aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2013-11-01 12:38:32 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-04 02:16:04 +0100
commita79e400150e9d550cc4ddc0c0497778d8b78fe5d (patch)
tree5a66670d4c31aaf0d356042b6fe607728e237b5b /src/3rdparty
parentb5991ce2a61219bda5a7fa6e33f323158d1eb78b (diff)
Fix various compiler warnings in order to remove warn_off in the near future
Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/double-conversion/cached-powers.cc1
-rw-r--r--src/3rdparty/double-conversion/fixed-dtoa.cc2
-rw-r--r--src/3rdparty/double-conversion/strtod.cc2
-rw-r--r--src/3rdparty/double-conversion/utils.h3
4 files changed, 7 insertions, 1 deletions
diff --git a/src/3rdparty/double-conversion/cached-powers.cc b/src/3rdparty/double-conversion/cached-powers.cc
index c676429194..7067fca4a9 100644
--- a/src/3rdparty/double-conversion/cached-powers.cc
+++ b/src/3rdparty/double-conversion/cached-powers.cc
@@ -144,6 +144,7 @@ void PowersOfTenCache::GetCachedPowerForBinaryExponentRange(
int max_exponent,
DiyFp* power,
int* decimal_exponent) {
+ (void)max_exponent; // Silence unused parameter warning in release builds
int kQ = DiyFp::kSignificandSize;
double k = ceil((min_exponent + kQ - 1) * kD_1_LOG2_10);
int foo = kCachedPowersOffset;
diff --git a/src/3rdparty/double-conversion/fixed-dtoa.cc b/src/3rdparty/double-conversion/fixed-dtoa.cc
index d56b1449b2..6d63c71858 100644
--- a/src/3rdparty/double-conversion/fixed-dtoa.cc
+++ b/src/3rdparty/double-conversion/fixed-dtoa.cc
@@ -152,6 +152,8 @@ static void FillDigits32(uint32_t number, Vector<char> buffer, int* length) {
static void FillDigits64FixedLength(uint64_t number, int requested_length,
Vector<char> buffer, int* length) {
+ (void) requested_length;
+
const uint32_t kTen7 = 10000000;
// For efficiency cut the number into 3 uint32_t parts, and print those.
uint32_t part2 = static_cast<uint32_t>(number % kTen7);
diff --git a/src/3rdparty/double-conversion/strtod.cc b/src/3rdparty/double-conversion/strtod.cc
index 9758989f71..2620fbbf0f 100644
--- a/src/3rdparty/double-conversion/strtod.cc
+++ b/src/3rdparty/double-conversion/strtod.cc
@@ -137,6 +137,7 @@ static void TrimAndCut(Vector<const char> buffer, int exponent,
Vector<const char> right_trimmed = TrimTrailingZeros(left_trimmed);
exponent += left_trimmed.length() - right_trimmed.length();
if (right_trimmed.length() > kMaxSignificantDecimalDigits) {
+ (void)space_size; // Silence unused parameter warning in release build
ASSERT(space_size >= kMaxSignificantDecimalDigits);
CutToMaxSignificantDigits(right_trimmed, exponent,
buffer_copy_space, updated_exponent);
@@ -515,6 +516,7 @@ float Strtof(Vector<const char> buffer, int exponent) {
double double_next2 = Double(double_next).NextDouble();
f4 = static_cast<float>(double_next2);
}
+ (void)f2; // Silence unused parameter warning in release builds
ASSERT(f1 <= f2 && f2 <= f3 && f3 <= f4);
// If the guess doesn't lie near a single-precision boundary we can simply
diff --git a/src/3rdparty/double-conversion/utils.h b/src/3rdparty/double-conversion/utils.h
index 044c0c25eb..29c7626345 100644
--- a/src/3rdparty/double-conversion/utils.h
+++ b/src/3rdparty/double-conversion/utils.h
@@ -302,7 +302,8 @@ template <class Dest, class Source>
inline Dest BitCast(const Source& source) {
// Compile time assertion: sizeof(Dest) == sizeof(Source)
// A compile error here means your Dest and Source have different sizes.
- typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
+ char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1];
+ (void) VerifySizesAreEqual;
Dest dest;
memmove(&dest, &source, sizeof(dest));