aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-11-26 21:47:28 +0800
committerchriseth <c@ethdev.com>2015-11-26 21:47:28 +0800
commite06768e8b580d009b9a9905f70ae2d8814699115 (patch)
tree1eb3bec6140d9b2e1ee57f62343dbc9c70d84c78
parent6a2a946200f3806d5daefa0220002ae934ea0ee3 (diff)
downloaddexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar.gz
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar.bz2
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar.lz
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar.xz
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.tar.zst
dexon-solidity-e06768e8b580d009b9a9905f70ae2d8814699115.zip
Fix MSVC errors and warnings.
-rw-r--r--libsolidity/analysis/NameAndTypeResolver.cpp6
-rw-r--r--libsolidity/analysis/ReferencesResolver.cpp3
-rw-r--r--libsolidity/formal/Why3Translator.h2
-rw-r--r--libsolidity/parsing/Parser.cpp2
4 files changed, 7 insertions, 6 deletions
diff --git a/libsolidity/analysis/NameAndTypeResolver.cpp b/libsolidity/analysis/NameAndTypeResolver.cpp
index 806f1322..fa894456 100644
--- a/libsolidity/analysis/NameAndTypeResolver.cpp
+++ b/libsolidity/analysis/NameAndTypeResolver.cpp
@@ -49,7 +49,7 @@ bool NameAndTypeResolver::registerDeclarations(SourceUnit& _sourceUnit)
{
DeclarationRegistrationHelper registrar(m_scopes, _sourceUnit, m_errors);
}
- catch (FatalError const& _e)
+ catch (FatalError const&)
{
if (m_errors.empty())
throw; // Something is weird here, rather throw again.
@@ -146,7 +146,7 @@ bool NameAndTypeResolver::resolveNamesAndTypes(ContractDefinition& _contract)
if (!success)
return false;
}
- catch (FatalError const& _e)
+ catch (FatalError const&)
{
if (m_errors.empty())
throw; // Something is weird here, rather throw again.
@@ -162,7 +162,7 @@ bool NameAndTypeResolver::updateDeclaration(Declaration const& _declaration)
m_scopes[nullptr].registerDeclaration(_declaration, false, true);
solAssert(_declaration.scope() == nullptr, "Updated declaration outside global scope.");
}
- catch (FatalError const& _error)
+ catch (FatalError const&)
{
if (m_errors.empty())
throw; // Something is weird here, rather throw again.
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp
index 408212f1..f0afc4f9 100644
--- a/libsolidity/analysis/ReferencesResolver.cpp
+++ b/libsolidity/analysis/ReferencesResolver.cpp
@@ -49,6 +49,7 @@ bool ReferencesResolver::visit(UserDefinedTypeName const& _typeName)
fatalDeclarationError(_typeName.location(), "Identifier not found or not unique.");
_typeName.annotation().referencedDeclaration = declaration;
+
_typeName.annotation().contractScope = m_currentContract;
return true;
}
@@ -59,7 +60,7 @@ bool ReferencesResolver::resolve(ASTNode& _root)
{
_root.accept(*this);
}
- catch (FatalError const& e)
+ catch (FatalError const&)
{
solAssert(m_errorOccurred, "");
}
diff --git a/libsolidity/formal/Why3Translator.h b/libsolidity/formal/Why3Translator.h
index 34c6c34f..e5c298b4 100644
--- a/libsolidity/formal/Why3Translator.h
+++ b/libsolidity/formal/Why3Translator.h
@@ -43,7 +43,7 @@ class SourceUnit;
class Why3Translator: private ASTConstVisitor
{
public:
- Why3Translator(ErrorList& _errors): m_lines{{std::string(), 0}}, m_errors(_errors) {}
+ Why3Translator(ErrorList& _errors): m_lines(std::vector<Line>{{std::string(), 0}}), m_errors(_errors) {}
/// Appends formalisation of the given source unit to the output.
/// @returns false on error.
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index c703ef27..2d4ca43e 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -88,7 +88,7 @@ ASTPointer<SourceUnit> Parser::parse(shared_ptr<Scanner> const& _scanner)
}
return nodeFactory.createNode<SourceUnit>(nodes);
}
- catch (FatalError const& _error)
+ catch (FatalError const&)
{
if (m_errors.empty())
throw; // Something is weird here, rather throw again.