mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
C99 scoping rules by default
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user