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 | |
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')
-rw-r--r-- | test/compilationTests/corion/provider.sol | 6 | ||||
-rw-r--r-- | test/compilationTests/stringutils/strings.sol | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/test/compilationTests/corion/provider.sol b/test/compilationTests/corion/provider.sol index 5fa90fcd..dba1253d 100644 --- a/test/compilationTests/corion/provider.sol +++ b/test/compilationTests/corion/provider.sol @@ -536,8 +536,9 @@ contract provider is module, safeMath, announcementTypes { address provAddr; uint256 provHeight; bool interest = false; + uint256 a; var rate = clients[msg.sender].lastRate; - for ( uint256 a = (clients[msg.sender].paidUpTo + 1) ; a <= currentSchellingRound ; a++ ) { + for ( a = (clients[msg.sender].paidUpTo + 1) ; a <= currentSchellingRound ; a++ ) { if (globalFunds[a].reward > 0 && globalFunds[a].supply > 0) { provAddr = clients[msg.sender].providerAddress; provHeight = clients[msg.sender].providerHeight; @@ -585,8 +586,9 @@ contract provider is module, safeMath, announcementTypes { uint256 steps; uint256 currHeight = providers[addr].currentHeight; uint256 LTSID = providers[addr].data[currHeight].lastSupplyID; + uint256 a; var rate = providers[addr].data[currHeight].lastPaidRate; - for ( uint256 a = (providers[addr].data[currHeight].paidUpTo + 1) ; a <= currentSchellingRound ; a++ ) { + for ( a = (providers[addr].data[currHeight].paidUpTo + 1) ; a <= currentSchellingRound ; a++ ) { if (globalFunds[a].reward > 0 && globalFunds[a].supply > 0) { if ( providers[addr].data[currHeight].rateHistory[a].valid ) { rate = providers[addr].data[currHeight].rateHistory[a].value; 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) { |