From a1ce66b304e7187cfae1457de91a031c0931273c Mon Sep 17 00:00:00 2001 From: Bob Summerwill Date: Fri, 18 Mar 2016 01:22:15 -0700 Subject: Fixed Windows warnings --- libsolidity/codegen/ExpressionCompiler.cpp | 3 ++- libsolidity/formal/Why3Translator.cpp | 2 +- test/contracts/FixedFeeRegistrar.cpp | 9 +++++++++ test/contracts/Wallet.cpp | 9 +++++++++ test/libsolidity/SolidityNameAndTypeResolution.cpp | 2 +- test/libsolidity/SolidityParser.cpp | 2 +- 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index e0b2b5f6..64eb6710 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -185,7 +185,8 @@ bool ExpressionCompiler::visit(Conditional const& _condition) utils().convertType(*_condition.falseExpression().annotation().type, *_condition.annotation().type); eth::AssemblyItem endTag = m_context.appendJumpToNew(); m_context << trueTag; - m_context.adjustStackOffset(-_condition.annotation().type->sizeOnStack()); + int offset = _condition.annotation().type->sizeOnStack(); + m_context.adjustStackOffset(-offset); _condition.trueExpression().accept(*this); utils().convertType(*_condition.trueExpression().annotation().type, *_condition.annotation().type); m_context << endTag; diff --git a/libsolidity/formal/Why3Translator.cpp b/libsolidity/formal/Why3Translator.cpp index 5028e2c3..24fbab13 100644 --- a/libsolidity/formal/Why3Translator.cpp +++ b/libsolidity/formal/Why3Translator.cpp @@ -36,7 +36,7 @@ bool Why3Translator::process(SourceUnit const& _source) appendPreface(); _source.accept(*this); } - catch (FatalError& _e) + catch (FatalError& /*_e*/) { solAssert(m_errorOccured, ""); } diff --git a/test/contracts/FixedFeeRegistrar.cpp b/test/contracts/FixedFeeRegistrar.cpp index f42f4492..796b3831 100644 --- a/test/contracts/FixedFeeRegistrar.cpp +++ b/test/contracts/FixedFeeRegistrar.cpp @@ -22,7 +22,16 @@ #include #include + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4535) // calling _set_se_translator requires /EHa +#endif #include +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + #include #include diff --git a/test/contracts/Wallet.cpp b/test/contracts/Wallet.cpp index 476e817b..7c4a9a84 100644 --- a/test/contracts/Wallet.cpp +++ b/test/contracts/Wallet.cpp @@ -22,7 +22,16 @@ #include #include + +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning(disable:4535) // calling _set_se_translator requires /EHa +#endif #include +#if defined(_MSC_VER) +#pragma warning(pop) +#endif + #include #include diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index bf43224f..3d0cc2cd 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -102,7 +102,7 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false) { return make_pair(sourceUnit, std::make_shared(_e.type())); } - catch (Exception const& _exception) + catch (Exception const& /*_exception*/) { return make_pair(sourceUnit, nullptr); } diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index 055fae49..2a7e82a7 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -60,7 +60,7 @@ bool successParse(std::string const& _source) if (!sourceUnit) return false; } - catch (FatalError const& _exception) + catch (FatalError const& /*_exception*/) { if (Error::containsErrorOfType(errors, Error::Type::ParserError)) return false; -- cgit v1.2.3