ToDo items for some uninitialized variables and other problems found by the compiler.

git-svn-id: trunk@48452 -
This commit is contained in:
juha 2015-03-22 10:17:59 +00:00
parent 708afdf966
commit 7003a55fb6
6 changed files with 7 additions and 3 deletions

View File

@ -373,6 +373,7 @@ begin
FReportDataSet.Free;
FColumnDataSet.Free;
end;
// ToDo: invert this assignment. Now SaveDesign is only assigned but not used.
SaveDesign:=frDesigner;
end;

View File

@ -1588,6 +1588,7 @@ begin
UpdateMenu(fMenu.Items, tempdesignermenuitem, 1, 3);
end else
begin
// ToDo: tempdesignermenuitem is not initialized here.
tempdesignermenuitem:=AddNewItemAfter(Root, tempdesignermenuitem.ID);
SetCoordinates(POSITION_LEFT,POSITION_TOP,0,Root);
ChangeCaption(tempdesignermenuitem,XMLConfig.GetValue(templatesubmenuitem + '/Name/Value',''));

View File

@ -1840,6 +1840,7 @@ var
Code: TCodeBuffer;
begin
// update project resource
// ToDo: Fix uninitialized Result.
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
AnUnitInfo := Project1.FirstPartOfProject;
while AnUnitInfo<>nil do

View File

@ -1838,6 +1838,7 @@ begin
AProject:=LazarusIDE.ActiveProject;
// virtual files belong to the project
// ToDo: Path is not initialized!
if not FilenameIsAbsolute(Path) then begin
Result:=AProject;
exit;

View File

@ -351,8 +351,7 @@ begin
APackage:=PackageEditingInterface.FindPackageWithName(OwnerName);
if APackage<>nil then begin
if APackage.IsVirtual then begin
s:=Format(lisCheckTheTargetOSCPULCLWidgetTypeMaybeYouHaveToReco, [
s]);
s:=Format(lisCheckTheTargetOSCPULCLWidgetTypeMaybeYouHaveToReco, [s]);
end else begin
s:=Format(lisMaybeYouHaveToRecompileThePackage, [s]);
end;
@ -363,6 +362,7 @@ begin
end;
end;
if PPUCount>1 then begin
// ToDo: Fix uninitialized FileNode. It is initialized inside a loop, this is outside of the loop.
InfoTreeView.Items.AddChild(FileNode,
lisDuplicatePpuFilesDeleteOneOrMakeSureAllSearchPaths);
end;

View File

@ -658,7 +658,7 @@ begin
end;
if Result = nil then // should never happen
Result := AnUnitInfo.OpenEditorInfo[0]
else begin
else begin // ToDo: replace uninitialized 'j' with something.
if (WantedTopLine>0)
and (AnUnitInfo.OpenEditorInfo[j].EditorComponent<>nil) then
AnUnitInfo.OpenEditorInfo[j].EditorComponent.TopLine:=WantedTopLine;