From 4690f837e0389cff5f11a320a08aeb54d752f087 Mon Sep 17 00:00:00 2001 From: Julius Huelsmann Date: Thu, 17 May 2018 12:07:33 +0200 Subject: [PATCH 1/3] Fix install_deps.sh script for Arch Linux. Also added cvc4 as dependency. --- scripts/install_deps.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/install_deps.sh b/scripts/install_deps.sh index fa5551bfe..1843b064c 100755 --- a/scripts/install_deps.sh +++ b/scripts/install_deps.sh @@ -133,19 +133,18 @@ case $(uname -s) in # Arch Linux #------------------------------------------------------------------------------ - Arch) + Arch*) #Arch echo "Installing solidity dependencies on Arch Linux." # All our dependencies can be found in the Arch Linux official repositories. # See https://wiki.archlinux.org/index.php/Official_repositories - # Also adding ethereum-git to allow for testing with the `eth` client sudo pacman -Syu \ base-devel \ boost \ cmake \ git \ - ethereum-git \ + cvc4 ;; #------------------------------------------------------------------------------ @@ -329,7 +328,7 @@ case $(uname -s) in "$install_z3" if [ "$CI" = true ]; then # install Z3 from PPA if the distribution does not provide it - if ! dpkg -l libz3-dev > /dev/null 2>&1 + if ! dpkg -l libz3-dev > /dev/null 2>&1 then sudo apt-add-repository -y ppa:hvr/z3 sudo apt-get -y update From 9e26f5fa0a956543f14dd84eb9d461ca75cce95e Mon Sep 17 00:00:00 2001 From: Julius Huelsmann Date: Thu, 17 May 2018 12:16:28 +0200 Subject: [PATCH 2/3] Do not catch exceptions by value in StandardCompiler --- libsolidity/interface/StandardCompiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index ee9b14406..c8d43e9f6 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -117,7 +117,7 @@ bool hashMatchesContent(string const& _hash, string const& _content) { return dev::h256(_hash) == dev::keccak256(_content); } - catch (dev::BadHexCharacter) + catch (dev::BadHexCharacter const&) { return false; } @@ -366,7 +366,7 @@ Json::Value StandardCompiler::compileInternal(Json::Value const& _input) // @TODO use libraries only for the given source libraries[library] = h160(address); } - catch (dev::BadHexCharacter) + catch (dev::BadHexCharacter const&) { return formatFatalError( "JSONError", From 1d3a37faff9a82a5269c3414a2d6fe868593afb1 Mon Sep 17 00:00:00 2001 From: Julius Huelsmann Date: Thu, 17 May 2018 12:19:29 +0200 Subject: [PATCH 3/3] Avoid "unneccesary parentheses in declaration of" warning with keeping a temporary variable. --- libsolidity/inlineasm/AsmParser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsolidity/inlineasm/AsmParser.cpp b/libsolidity/inlineasm/AsmParser.cpp index d3b0808b4..d300f8fba 100644 --- a/libsolidity/inlineasm/AsmParser.cpp +++ b/libsolidity/inlineasm/AsmParser.cpp @@ -606,7 +606,9 @@ bool Parser::isValidNumberLiteral(string const& _literal) { try { - u256(_literal); + // Try to convert _literal to u256. + auto tmp = u256(_literal); + (void) tmp; } catch (...) {