From 4ef6655e887e4088b8faf0cf5857fd49edbcd498 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Thu, 25 Jan 2018 13:40:29 -0500 Subject: address some MSVC warnings (#1386) * fix unused variable warnings in wasm2asm.cpp No need to give the bad_alloc exception a name when we do nothing with it. * add appropriate casts for shift operands MSVC complains about implicitly converting results from 32 bits to 64 bits here, so we might as well make it clear that we intended the 64-bit shift to happen in the first place. * disable C4722 on MSVC We annotated Fatal::~Fatal with WASM_NORETURN, yet MSVC still warns, so take the next step and silence the warning completely. * don't warn about "deprecated" POSIX functions with MSVC Non-Windows platforms don't have the names MSVC recommends using, and everybody understands the POSIX names, so just silence the warning. --- src/tools/wasm2asm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/wasm2asm.cpp') diff --git a/src/tools/wasm2asm.cpp b/src/tools/wasm2asm.cpp index 5c331f4c3..4198c8784 100644 --- a/src/tools/wasm2asm.cpp +++ b/src/tools/wasm2asm.cpp @@ -80,7 +80,7 @@ int main(int argc, const char *argv[]) { } catch (ParseException& p) { p.dump(std::cerr); Fatal() << "error in parsing input"; - } catch (std::bad_alloc& b) { + } catch (std::bad_alloc&) { Fatal() << "error in building module, std::bad_alloc (possibly invalid request for silly amounts of memory)"; } -- cgit v1.2.3