Recent

Author Topic: [SOLVED] Clean up at procedure TCustomDaemonApplication.RemoveController  (Read 841 times)

lagprogramming

  • Sr. Member
  • ****
  • Posts: 407
packages/fcl-extra/src/unix/daemonapp.inc has the following procedure:
Code: Pascal  [Select][+][-]
  1. procedure TCustomDaemonApplication.RemoveController(
  2.   AController: TDaemonController);
  3.  
  4. Var
  5.   I : Integer;
  6.   HC : Boolean;
  7.  
  8. begin
  9.   FreeAndNil(AController.FDaemon);
  10.   AController.Free;
  11. end;
Variables I and HC are declared but never used.
The following patch removes them, making the procedure look like the procedure with the same name that can be found in packages/fcl-extra/src/win/daemonapp.inc
Code: Pascal  [Select][+][-]
  1. diff --git a/packages/fcl-extra/src/unix/daemonapp.inc b/packages/fcl-extra/src/unix/daemonapp.inc
  2. index 3022ef44a2..07f3a41409 100644
  3. --- a/packages/fcl-extra/src/unix/daemonapp.inc
  4. +++ b/packages/fcl-extra/src/unix/daemonapp.inc
  5. @@ -122,10 +122,6 @@ procedure TCustomDaemonApplication.SysEndRunDaemons;
  6.  procedure TCustomDaemonApplication.RemoveController(
  7.    AController: TDaemonController);
  8.    
  9. -Var
  10. -  I : Integer;
  11. -  HC : Boolean;
  12. -  
  13.  begin
  14.    FreeAndNil(AController.FDaemon);
  15.    AController.Free;
« Last Edit: July 17, 2023, 06:45:41 pm by lagprogramming »

avra

  • Hero Member
  • *****
  • Posts: 2532
    • Additional info
Re: Clean up at procedure TCustomDaemonApplication.RemoveController
« Reply #1 on: July 17, 2023, 01:36:20 pm »
There is not a big chance that your patch is applied if you just publish it in the forum. Bugtracker link on your left is the place to go and report such things.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib


 

TinyPortal © 2005-2018