Re: [fpc-pascal] missing compiler warning in for loop - is this intentional?

2012-05-01 Thread Florian Klämpfl
Am 01.05.2012 15:20, schrieb Bernd: > I just had written this little faulty piece of code: > > procedure TBuddyList.RemoveBuddy(ABuddy: TABuddy); > var > I,J,Last : Integer; > begin > EnterCriticalsection(FCritical); > Last := Length(FList) - 1; > for I := 0 to Last do begin > if FList

[fpc-pascal] missing compiler warning in for loop - is this intentional?

2012-05-01 Thread Bernd
I just had written this little faulty piece of code: procedure TBuddyList.RemoveBuddy(ABuddy: TABuddy); var I,J,Last : Integer; begin EnterCriticalsection(FCritical); Last := Length(FList) - 1; for I := 0 to Last do begin if FList[I] = ABuddy then begin for J := I to Last-1 do be