mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Print warning for unnamed return parameters and no return statement
This commit is contained in:
+2
@@ -4,3 +4,5 @@ contract C {
|
||||
a;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6321: (46-50): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
|
||||
+4
@@ -9,3 +9,7 @@ contract C {
|
||||
function g() internal pure returns (uint, uint, uint, D.S[20] storage x, uint) { x = x; }
|
||||
}
|
||||
// ----
|
||||
// Warning 6321: (176-180): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (182-186): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (188-192): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (213-217): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
|
||||
+5
@@ -10,3 +10,8 @@ contract C {
|
||||
function h() internal pure returns (bytes memory, string storage s) { s = s; }
|
||||
}
|
||||
// ----
|
||||
// Warning 6321: (51-55): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (57-61): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (63-67): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// Warning 6321: (69-73): Unnamed return variable can remain unassigned. Add an explicit return with value to all non-reverting code paths or name the variable.
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user