diff options
author | chriseth <chris@ethereum.org> | 2018-06-21 19:57:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-21 19:57:59 +0800 |
commit | 0d1047181d22c049aa5573acf9826d1701dd66ae (patch) | |
tree | 2e0295bb85a9a24b97ee6a7c3316d82369805ada /test/compilationTests/stringutils/strings.sol | |
parent | 7e4bd3e3468ec1d240068fde5b45f380cdef411c (diff) | |
parent | 8862b3092bcdbcb8314ec27e2b11bf25fcc6346a (diff) | |
download | dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar.gz dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar.bz2 dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar.lz dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar.xz dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.tar.zst dexon-solidity-0d1047181d22c049aa5573acf9826d1701dd66ae.zip |
Merge pull request #4306 from ethereum/remove_050_workaround_scoping
[BREAKING] C99 scoping rules by default (remove 050 workaround)
Diffstat (limited to 'test/compilationTests/stringutils/strings.sol')
-rw-r--r-- | test/compilationTests/stringutils/strings.sol | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/compilationTests/stringutils/strings.sol b/test/compilationTests/stringutils/strings.sol index 771f7a53..939a777a 100644 --- a/test/compilationTests/stringutils/strings.sol +++ b/test/compilationTests/stringutils/strings.sol @@ -155,7 +155,8 @@ library strings { // Starting at ptr-31 means the LSB will be the byte we care about var ptr = self._ptr - 31; var end = ptr + self._len; - for (uint len = 0; ptr < end; len++) { + uint len; + for (len = 0; ptr < end; len++) { uint8 b; assembly { b := and(mload(ptr), 0xFF) } if (b < 0x80) { @@ -695,7 +696,7 @@ library strings { uint retptr; assembly { retptr := add(ret, 32) } - for(i = 0; i < parts.length; i++) { + for(uint i = 0; i < parts.length; i++) { memcpy(retptr, parts[i]._ptr, parts[i]._len); retptr += parts[i]._len; if (i < parts.length - 1) { |