summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-06 11:38:49 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-06 10:58:10 +0000
commit5160ca54bb01b1d7bb0e6b359aa3d475df22e6f0 (patch)
tree6400b09486c94cce86ea672377db7b2a3b2deb6b /Source
parent5d5b80aa50ba3a3082819ec0c1f60cdaca82bbde (diff)
Fix two gcc 5.0 warnings
Improved warnings in gcc 5.0 has exposed some unclear expressions. Change-Id: I2c269528f6246319dab1a83d929d55c8d8e5a17d Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'Source')
-rw-r--r--Source/JavaScriptCore/runtime/PropertyDescriptor.cpp6
-rw-r--r--Source/WTF/wtf/SaturatedArithmetic.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
index 14b42fd9a..0b93b6ce1 100644
--- a/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
+++ b/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
@@ -183,9 +183,9 @@ bool sameValue(ExecState* exec, JSValue a, JSValue b)
bool PropertyDescriptor::equalTo(ExecState* exec, const PropertyDescriptor& other) const
{
- if (!other.m_value == m_value ||
- !other.m_getter == m_getter ||
- !other.m_setter == m_setter)
+ if (other.m_value.isEmpty() != m_value.isEmpty() ||
+ other.m_getter.isEmpty() != m_getter.isEmpty() ||
+ other.m_setter.isEmpty() != m_setter.isEmpty())
return false;
return (!m_value || sameValue(exec, other.m_value, m_value))
&& (!m_getter || JSValue::strictEqual(exec, other.m_getter, m_getter))
diff --git a/Source/WTF/wtf/SaturatedArithmetic.h b/Source/WTF/wtf/SaturatedArithmetic.h
index cf9e8e17e..194fc88ba 100644
--- a/Source/WTF/wtf/SaturatedArithmetic.h
+++ b/Source/WTF/wtf/SaturatedArithmetic.h
@@ -43,7 +43,7 @@ inline int32_t saturatedAddition(int32_t a, int32_t b)
// Can only overflow if the signed bit of the two values match. If the signed
// bit of the result and one of the values differ it did overflow.
- if (!((ua ^ ub) >> 31) & (result ^ ua) >> 31)
+ if (~((ua ^ ub) >> 31) & (result ^ ua) >> 31)
result = std::numeric_limits<int>::max() + (ua >> 31);
return result;