mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 14:07:27 +01:00
ToDo items for some uninitialized variables and other problems found by the compiler.
git-svn-id: trunk@48452 -
This commit is contained in:
parent
708afdf966
commit
7003a55fb6
@ -373,6 +373,7 @@ begin
|
|||||||
FReportDataSet.Free;
|
FReportDataSet.Free;
|
||||||
FColumnDataSet.Free;
|
FColumnDataSet.Free;
|
||||||
end;
|
end;
|
||||||
|
// ToDo: invert this assignment. Now SaveDesign is only assigned but not used.
|
||||||
SaveDesign:=frDesigner;
|
SaveDesign:=frDesigner;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1588,6 +1588,7 @@ begin
|
|||||||
UpdateMenu(fMenu.Items, tempdesignermenuitem, 1, 3);
|
UpdateMenu(fMenu.Items, tempdesignermenuitem, 1, 3);
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
|
// ToDo: tempdesignermenuitem is not initialized here.
|
||||||
tempdesignermenuitem:=AddNewItemAfter(Root, tempdesignermenuitem.ID);
|
tempdesignermenuitem:=AddNewItemAfter(Root, tempdesignermenuitem.ID);
|
||||||
SetCoordinates(POSITION_LEFT,POSITION_TOP,0,Root);
|
SetCoordinates(POSITION_LEFT,POSITION_TOP,0,Root);
|
||||||
ChangeCaption(tempdesignermenuitem,XMLConfig.GetValue(templatesubmenuitem + '/Name/Value',''));
|
ChangeCaption(tempdesignermenuitem,XMLConfig.GetValue(templatesubmenuitem + '/Name/Value',''));
|
||||||
|
|||||||
@ -1840,6 +1840,7 @@ var
|
|||||||
Code: TCodeBuffer;
|
Code: TCodeBuffer;
|
||||||
begin
|
begin
|
||||||
// update project resource
|
// update project resource
|
||||||
|
// ToDo: Fix uninitialized Result.
|
||||||
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
|
Project1.ProjResources.Regenerate(Project1.MainFileName, False, True, TestDir);
|
||||||
AnUnitInfo := Project1.FirstPartOfProject;
|
AnUnitInfo := Project1.FirstPartOfProject;
|
||||||
while AnUnitInfo<>nil do
|
while AnUnitInfo<>nil do
|
||||||
|
|||||||
@ -1838,6 +1838,7 @@ begin
|
|||||||
AProject:=LazarusIDE.ActiveProject;
|
AProject:=LazarusIDE.ActiveProject;
|
||||||
|
|
||||||
// virtual files belong to the project
|
// virtual files belong to the project
|
||||||
|
// ToDo: Path is not initialized!
|
||||||
if not FilenameIsAbsolute(Path) then begin
|
if not FilenameIsAbsolute(Path) then begin
|
||||||
Result:=AProject;
|
Result:=AProject;
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@ -351,8 +351,7 @@ begin
|
|||||||
APackage:=PackageEditingInterface.FindPackageWithName(OwnerName);
|
APackage:=PackageEditingInterface.FindPackageWithName(OwnerName);
|
||||||
if APackage<>nil then begin
|
if APackage<>nil then begin
|
||||||
if APackage.IsVirtual then begin
|
if APackage.IsVirtual then begin
|
||||||
s:=Format(lisCheckTheTargetOSCPULCLWidgetTypeMaybeYouHaveToReco, [
|
s:=Format(lisCheckTheTargetOSCPULCLWidgetTypeMaybeYouHaveToReco, [s]);
|
||||||
s]);
|
|
||||||
end else begin
|
end else begin
|
||||||
s:=Format(lisMaybeYouHaveToRecompileThePackage, [s]);
|
s:=Format(lisMaybeYouHaveToRecompileThePackage, [s]);
|
||||||
end;
|
end;
|
||||||
@ -363,6 +362,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if PPUCount>1 then begin
|
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,
|
InfoTreeView.Items.AddChild(FileNode,
|
||||||
lisDuplicatePpuFilesDeleteOneOrMakeSureAllSearchPaths);
|
lisDuplicatePpuFilesDeleteOneOrMakeSureAllSearchPaths);
|
||||||
end;
|
end;
|
||||||
|
|||||||
@ -658,7 +658,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
if Result = nil then // should never happen
|
if Result = nil then // should never happen
|
||||||
Result := AnUnitInfo.OpenEditorInfo[0]
|
Result := AnUnitInfo.OpenEditorInfo[0]
|
||||||
else begin
|
else begin // ToDo: replace uninitialized 'j' with something.
|
||||||
if (WantedTopLine>0)
|
if (WantedTopLine>0)
|
||||||
and (AnUnitInfo.OpenEditorInfo[j].EditorComponent<>nil) then
|
and (AnUnitInfo.OpenEditorInfo[j].EditorComponent<>nil) then
|
||||||
AnUnitInfo.OpenEditorInfo[j].EditorComponent.TopLine:=WantedTopLine;
|
AnUnitInfo.OpenEditorInfo[j].EditorComponent.TopLine:=WantedTopLine;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user