diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-06-15 18:30:28 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-06-20 18:53:38 +0800 |
commit | 8862b3092bcdbcb8314ec27e2b11bf25fcc6346a (patch) | |
tree | 4570b3adc9678c944546144f5989629003422194 /test/compilationTests/stringutils | |
parent | ba7fbf11e72a4f9da149ac3c9b4c908e4f215250 (diff) | |
download | dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar.gz dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar.bz2 dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar.lz dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar.xz dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.tar.zst dexon-solidity-8862b3092bcdbcb8314ec27e2b11bf25fcc6346a.zip |
C99 scoping rules by default
Diffstat (limited to 'test/compilationTests/stringutils')
-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) { |