diff options
author | chriseth <chris@ethereum.org> | 2018-08-03 16:45:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-03 16:45:50 +0800 |
commit | da6cefd475210a9bcae0aad80c03f3679ae00f56 (patch) | |
tree | 333c713b73fcbb8a6ad13f6c701b1014e4374b21 /libsolidity/analysis/ControlFlowAnalyzer.cpp | |
parent | 04efbc9e46b3de6572621ba9e5f6683c8a9ded34 (diff) | |
parent | 35c5b7de256f09bcfb77c6dc700ea1a54b1ec27c (diff) | |
download | dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar.gz dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar.bz2 dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar.lz dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar.xz dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.tar.zst dexon-solidity-da6cefd475210a9bcae0aad80c03f3679ae00f56.zip |
Merge pull request #4664 from ethereum/uninitializedStorageReturn
Turn warning about uninitialized storage returns into an error.
Diffstat (limited to 'libsolidity/analysis/ControlFlowAnalyzer.cpp')
-rw-r--r-- | libsolidity/analysis/ControlFlowAnalyzer.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/analysis/ControlFlowAnalyzer.cpp b/libsolidity/analysis/ControlFlowAnalyzer.cpp index 6edf7986..483d08c8 100644 --- a/libsolidity/analysis/ControlFlowAnalyzer.cpp +++ b/libsolidity/analysis/ControlFlowAnalyzer.cpp @@ -144,12 +144,12 @@ void ControlFlowAnalyzer::checkUnassignedStorageReturnValues( ssl.append("Problematic end of function:", _function.location()); } - m_errorReporter.warning( + m_errorReporter.typeError( returnVal->location(), - "This variable is of storage pointer type and might be returned without assignment. " - "This can cause storage corruption. Assign the variable (potentially from itself) " - "to remove this warning.", - ssl + ssl, + "This variable is of storage pointer type and might be returned without assignment and " + "could be used uninitialized. Assign the variable (potentially from itself) " + "to fix this error." ); } } |