Forum > FPC development

[SOLVED] Clean up at procedure TCustomDaemonApplication.RemoveController

(1/1)

lagprogramming:
packages/fcl-extra/src/unix/daemonapp.inc has the following procedure:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TCustomDaemonApplication.RemoveController(  AController: TDaemonController);  Var  I : Integer;  HC : Boolean;  begin  FreeAndNil(AController.FDaemon);  AController.Free;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  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/packages/fcl-extra/src/unix/daemonapp.inc b/packages/fcl-extra/src/unix/daemonapp.incindex 3022ef44a2..07f3a41409 100644--- a/packages/fcl-extra/src/unix/daemonapp.inc+++ b/packages/fcl-extra/src/unix/daemonapp.inc@@ -122,10 +122,6 @@ procedure TCustomDaemonApplication.SysEndRunDaemons; procedure TCustomDaemonApplication.RemoveController(   AController: TDaemonController);   -Var-  I : Integer;-  HC : Boolean;-   begin   FreeAndNil(AController.FDaemon);   AController.Free;

avra:
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.

AlexTP:
Posted to https://gitlab.com/freepascal.org/fpc/source/-/issues/40355

Navigation

[0] Message Index

Go to full version