From 8da5d6a85497b256c4f14a08faa2e646d36946ad Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 4 Jun 2021 10:59:03 +0200 Subject: [PATCH] Update test expectations. --- .../functions/function_call_does_not_clear_local_vars.sol | 1 + .../multiSingleVariableDeclaration.sol | 1 + .../multiVariableDeclarationSimple.sol | 1 + .../nameAndTypeResolution/001_name_references.sol | 1 + .../viewPureChecker/call_internal_functions_success.sol | 6 ++++++ .../syntaxTests/viewPureChecker/view_pure_abi_encode.sol | 1 + 6 files changed, 11 insertions(+) diff --git a/test/libsolidity/smtCheckerTests/functions/function_call_does_not_clear_local_vars.sol b/test/libsolidity/smtCheckerTests/functions/function_call_does_not_clear_local_vars.sol index 8d21f58fa..7fd4fcff1 100644 --- a/test/libsolidity/smtCheckerTests/functions/function_call_does_not_clear_local_vars.sol +++ b/test/libsolidity/smtCheckerTests/functions/function_call_does_not_clear_local_vars.sol @@ -10,3 +10,4 @@ contract C { // ==== // SMTEngine: all // ---- +// Warning 5740: (122-136): Unreachable code. diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiSingleVariableDeclaration.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiSingleVariableDeclaration.sol index 428428bee..b08ca8fc0 100644 --- a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiSingleVariableDeclaration.sol +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiSingleVariableDeclaration.sol @@ -5,3 +5,4 @@ contract C { } } // ---- +// Warning 5740: (78-79): Unreachable code. diff --git a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol index c29045702..742ae5a0d 100644 --- a/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol +++ b/test/libsolidity/syntaxTests/multiVariableDeclaration/multiVariableDeclarationSimple.sol @@ -10,4 +10,5 @@ contract C { function h() internal pure returns (bytes memory, string storage s) { s = s; } } // ---- +// Warning 5740: (111-115): Unreachable code. // Warning 6321: (250-262): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/001_name_references.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/001_name_references.sol index 2bf964ff3..cfbf9365e 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/001_name_references.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/001_name_references.sol @@ -3,4 +3,5 @@ contract test { function f(uint256) public returns (uint out) { f(variable); test; out; } } // ---- +// Warning 5740: (103-112): Unreachable code. // Warning 6133: (103-107): Statement has no effect. diff --git a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_success.sol b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_success.sol index 3023967ca..858f5d7da 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_success.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/call_internal_functions_success.sol @@ -5,3 +5,9 @@ contract C { function i() payable public { i(); h(); g(); f(); } } // ---- +// Warning 5740: (102-105): Unreachable code. +// Warning 5740: (140-143): Unreachable code. +// Warning 5740: (145-148): Unreachable code. +// Warning 5740: (191-194): Unreachable code. +// Warning 5740: (196-199): Unreachable code. +// Warning 5740: (201-204): Unreachable code. diff --git a/test/libsolidity/syntaxTests/viewPureChecker/view_pure_abi_encode.sol b/test/libsolidity/syntaxTests/viewPureChecker/view_pure_abi_encode.sol index d7146f2b5..9e147e6b2 100644 --- a/test/libsolidity/syntaxTests/viewPureChecker/view_pure_abi_encode.sol +++ b/test/libsolidity/syntaxTests/viewPureChecker/view_pure_abi_encode.sol @@ -7,3 +7,4 @@ contract C { } } // ---- +// Warning 5740: (142-237): Unreachable code.