From 346fb91740d16866e941d7afc8b8997bace5ced7 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 4 Aug 2014 09:20:35 +0200 Subject: [PATCH] Bug 1047301: Silence Clang warning about signed/unsigned comparison in SIMD.cpp; r=jandem --- js/src/builtin/SIMD.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/builtin/SIMD.cpp b/js/src/builtin/SIMD.cpp index dfb06a47418..43233fc21b8 100644 --- a/js/src/builtin/SIMD.cpp +++ b/js/src/builtin/SIMD.cpp @@ -675,7 +675,8 @@ FuncShuffle(JSContext *cx, unsigned argc, Value *vp) // bits select the first lane, the next log2(L) the second, and so on. const uint32_t SELECT_SHIFT = FloorLog2(V::lanes); const uint32_t SELECT_MASK = V::lanes - 1; - const uint32_t MAX_MASK_VALUE = uint32_t(pow(double(V::lanes), double(V::lanes))) - 1; + const int32_t MAX_MASK_VALUE = int32_t(pow(double(V::lanes), double(V::lanes))) - 1; + JS_ASSERT(MAX_MASK_VALUE > 0); Elem result[V::lanes]; if (args.length() == 2) {