summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-03-28 21:03:38 -0300
committerQt by Nokia <qt-info@nokia.com>2012-03-29 02:07:38 +0200
commit2d35844ee583175dffd3e4e0bc9916a727598678 (patch)
treef10a48fe5d8a95b1905f475192e079062dbd6ca6
parentcc3ff3c1f6aa22de4fc70e741400d05d1a961af5 (diff)
Fix operator precedence order.
Clang (I guess it was clang) reports: io/qipaddress.cpp:276:34: warning: operator '?:' has lower precedence than '+'; '+' will be evaluated first [-Wparentheses] Fix the precedence by wrapping the ternary expression in parentheses. Change-Id: I1c995dc8e2b1b831480ea8f8a695f7f89c08fcac Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
-rw-r--r--src/corelib/io/qipaddress.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qipaddress.cpp b/src/corelib/io/qipaddress.cpp
index e996c8665c..c8857263cd 100644
--- a/src/corelib/io/qipaddress.cpp
+++ b/src/corelib/io/qipaddress.cpp
@@ -273,7 +273,7 @@ void toString(QString &appendTo, IPv6Address address)
// QString::reserve doesn't shrink, so it's fine to us
appendTo.reserve(appendTo.size() +
- embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen);
+ (embeddedIp4 ? Ip6WithIp4AddressMaxLen : Ip6AddressMaxLen));
// for finding where to place the "::"
int zeroRunLength = 0; // in octets