View Issue Details

IDProjectCategoryView StatusLast Update
0034271FPCFCLpublic2018-09-21 20:22
ReporterAndrey ZubarevAssigned ToSven Barth 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version3.3.1 
Summary0034271: Less hints in fcl-stl
Descriptiongset.pp(401,39) Hint: Local variable "position" does not seem to be initialized
TagsNo tags attached.
Fixed in Revision39785
FPCOldBugId
FPCTarget
Attached Files
  • gset.pp.patch (651 bytes)
    Index: packages/fcl-stl/src/gset.pp
    ===================================================================
    --- packages/fcl-stl/src/gset.pp	(revision 39694)
    +++ packages/fcl-stl/src/gset.pp	(working copy)
    @@ -53,7 +53,7 @@
         function RotateLeft(nod:PNode):PNode;inline;
         procedure FlipColors(nod:PNode);inline;
         function IsRed(nod:PNode):boolean;inline;
    -    function Insert(value:T; nod:PNode; var position:PNode):PNode;
    +    function Insert(value:T; nod:PNode; out position:PNode):PNode;
         function FixUp(nod:PNode):PNode;inline;
         function MoveRedLeft(nod:PNode):PNode;inline;
         function MoveRedRight(nod:PNode):PNode;inline;
    
    gset.pp.patch (651 bytes)

Activities

Andrey Zubarev

2018-09-13 12:26

reporter  

gset.pp.patch (651 bytes)
Index: packages/fcl-stl/src/gset.pp
===================================================================
--- packages/fcl-stl/src/gset.pp	(revision 39694)
+++ packages/fcl-stl/src/gset.pp	(working copy)
@@ -53,7 +53,7 @@
     function RotateLeft(nod:PNode):PNode;inline;
     procedure FlipColors(nod:PNode);inline;
     function IsRed(nod:PNode):boolean;inline;
-    function Insert(value:T; nod:PNode; var position:PNode):PNode;
+    function Insert(value:T; nod:PNode; out position:PNode):PNode;
     function FixUp(nod:PNode):PNode;inline;
     function MoveRedLeft(nod:PNode):PNode;inline;
     function MoveRedRight(nod:PNode):PNode;inline;
gset.pp.patch (651 bytes)

Sven Barth

2018-09-21 14:56

manager   ~0110927

Do you have an example (code plus compiler invocation) that shows the hint? Cause I'm trying here and I don't get the hint, so I can't test whether your patch is really making a difference...

Sven Barth

2018-09-21 15:00

manager   ~0110928

Ah, sorry, I had forgotten that I had already applied your patch. *facepalm*

Anyway. Thank you for the patch! Please test and close if okay.

Andrey Zubarev

2018-09-21 20:22

reporter   ~0110937

Thanks!

Issue History

Date Modified Username Field Change
2018-09-13 12:26 Andrey Zubarev New Issue
2018-09-13 12:26 Andrey Zubarev File Added: gset.pp.patch
2018-09-21 14:56 Sven Barth Note Added: 0110927
2018-09-21 14:56 Sven Barth Assigned To => Sven Barth
2018-09-21 14:56 Sven Barth Status new => feedback
2018-09-21 15:00 Sven Barth Fixed in Revision => 39785
2018-09-21 15:00 Sven Barth Note Added: 0110928
2018-09-21 15:00 Sven Barth Status feedback => resolved
2018-09-21 15:00 Sven Barth Fixed in Version => 3.3.1
2018-09-21 15:00 Sven Barth Resolution open => fixed
2018-09-21 20:22 Andrey Zubarev Note Added: 0110937
2018-09-21 20:22 Andrey Zubarev Status resolved => closed