aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2019-05-13 11:18:28 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2019-05-15 08:17:16 +0000
commit733adcf32c1cce288435940c66846a51ad29a464 (patch)
tree3d13a1285dd549076653677d6c172d7e854037f4 /src/qml/jsruntime
parent078eb28e0c657b8107c5e8be873b3503fdea7ed2 (diff)
Compile fix
It fixes the following issue: error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare] Change-Id: I4b896f49ff753a5cf79cd1e40e76815f712eec89 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4memberdata.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4memberdata.cpp b/src/qml/jsruntime/qv4memberdata.cpp
index f327c85001..ffebe1b5da 100644
--- a/src/qml/jsruntime/qv4memberdata.cpp
+++ b/src/qml/jsruntime/qv4memberdata.cpp
@@ -72,8 +72,8 @@ Heap::MemberData *MemberData::allocate(ExecutionEngine *e, uint n, Heap::MemberD
// The above code can overflow in a number of interesting ways. All of those are unsigned,
// and therefore defined behavior. Still, apply some sane bounds.
- if (alloc > std::numeric_limits<int>::max())
- alloc = std::numeric_limits<int>::max();
+ if (alloc > size_t(std::numeric_limits<int>::max()))
+ alloc = size_t(std::numeric_limits<int>::max());
Heap::MemberData *m;
if (old) {