Fix more uninitialized variables.

git-svn-id: trunk@48458 -
This commit is contained in:
juha 2015-03-22 22:39:33 +00:00
parent beb11406dd
commit bd959215d1
8 changed files with 24 additions and 13 deletions

View File

@ -345,10 +345,12 @@ begin
end;
function TPoCheckerSettings.LoadLangPath: String;
{$IFDEF POCHECKERSTANDALONE}
var
SL: TStringList;
i: Integer;
S: String;
{$ENDIF}
begin
{$IFDEF POCHECKERSTANDALONE}
//allow override on commandline
@ -378,7 +380,7 @@ begin
Result := FConfig.GetValue(pLangPath+'Value','');
{$ELSE}
Result := '';
{$eNDIF}
{$ENDIF}
end;

View File

@ -422,8 +422,8 @@ end;
function TAssemblerDlg.GetBreakpointFor(AnAsmDlgLineEntry: TAsmDlgLineEntry): TIDEBreakPoint;
begin
if BreakPoints = nil then exit;
Result := nil;
if BreakPoints = nil then exit;
case AnAsmDlgLineEntry.State of
lmsStatement: Result := BreakPoints.Find(AnAsmDlgLineEntry.Addr);
lmsSource: Result := BreakPoints.Find(AnAsmDlgLineEntry.FullFileName, AnAsmDlgLineEntry.SourceLine);

View File

@ -3310,10 +3310,9 @@ function TIdeWatchValue.GetValue: String;
var
i: Integer;
begin
if not Watch.Enabled then begin
Result := '<disabled>';
exit;
end;
Result := '';
if not Watch.Enabled then
exit('<disabled>');
i := DbgStateChangeCounter; // workaround for state changes during TWatchValue.GetValue
if Validity = ddsUnknown then begin
Result := '<evaluating>';

View File

@ -761,7 +761,9 @@ begin
SearchObj.SearchOptions:= TheOptions;
end;
NewTreeView.Skipped:=0;
end;//if
end
else
NewTreeView:=nil;
Result:= Pages[PageIndex];
SearchInListEdit.Text:='';
SearchInListEdit.Filter:='';

View File

@ -2127,7 +2127,10 @@ end;
function TWidgetSet.SystemParametersInfo(uiAction: DWord; uiParam: DWord; pvParam: Pointer; fWinIni: DWord): LongBool;
begin
case uiAction of
SPI_GETWHEELSCROLLLINES: PDword(pvPAram)^ := 3; // default value
SPI_GETWHEELSCROLLLINES: begin
PDword(pvPAram)^ := 3; // default value
Result := True;
end;
else
Result := False;
end

View File

@ -1677,6 +1677,7 @@ begin
MapID.Wnd := Wnd;
MapID.nIDEvent := nIdEvent;
InfoPtr := nil;
Existing := MTimerMap.GetData(MapID, ID);
if Existing
then begin

View File

@ -2964,6 +2964,7 @@ var
ObjectName := '';
ObjectType := parser.TokenString;
ParserNextToken;
ChildPos := 0;
if parser.Token = ':' then begin
ParserNextToken;
parser.CheckToken(toSymbol);
@ -3541,8 +3542,7 @@ begin
end;
end;
function FloatToLFMStr(const Value: extended; Precision, Digits: Integer
): string;
function FloatToLFMStr(const Value: extended; Precision, Digits: Integer): string;
var
P: Integer;
TooSmall, TooLarge: Boolean;
@ -3552,7 +3552,11 @@ begin
If (Precision = -1) or (Precision > 15) then Precision := 15;
TooSmall := (Abs(Value) < 0.00001) and (Value>0.0);
if not TooSmall then begin
if TooSmall then begin
P := 0;
TooLarge := False;
end
else begin
Str(Value:digits:precision, Result);
P := Pos('.', Result);
TooLarge :=(P > Precision + 1) or (Pos('E', Result)<>0);

View File

@ -430,8 +430,9 @@ var
Count: Integer;
begin
Count := 0;
Result := 0;
if MyFile.Count < 0 then
exit(0);
exit;
for I := 0 to MyFile.Count -1 do begin
// find start of TYPE
if pos('TYPE', uppercase(MyFile[i])) > 0 then begin
@ -458,7 +459,6 @@ end;
function TFrmComponentMan.GetComponent(I: Integer): String;
var
K, J: integer;
TempStr: String;
Count: Integer;
begin
Result := '';