From ca5cc20e5163f0ee16a51832ac21ed5d6d20529f Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Wed, 14 Mar 2018 21:43:04 +0000 Subject: [PATCH] [WebAssembly] Fix -Werror=extra failure due to enum in ternary llvm-svn: 327579 --- lld/wasm/Writer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index 5043ebd..9d7684c 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -194,7 +194,8 @@ void Writer::createMemorySection() { bool HasMax = MaxMemoryPages != 0; writeUleb128(OS, 1, "memory count"); - writeUleb128(OS, HasMax ? WASM_LIMITS_FLAG_HAS_MAX : 0, "memory limits flags"); + writeUleb128(OS, HasMax ? static_cast(WASM_LIMITS_FLAG_HAS_MAX) : 0, + "memory limits flags"); writeUleb128(OS, NumMemoryPages, "initial pages"); if (HasMax) writeUleb128(OS, MaxMemoryPages, "max pages"); -- 2.7.4