From e896377eada561b368b5bc9976e20337ab4340e9 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Sun, 29 Sep 2024 23:00:00 +0100 Subject: [PATCH] extflat/EFantenna.c: EFDone() Call to function with fewer arguments than declared parameters Passing NULL is valid in efFreeNodeList() to not perform callback.. extflat/EFdef.c: ^231a299 (2017-04-25 08:41:48 -0400 97) void 5e3c26c9 (2021-12-13 18:05:53 -0500 98) EFDone(func) 5e3c26c9 (2021-12-13 18:05:53 -0500 99) int (*func)(); commit 5e3c26c95afadfd07753bb8126fa6528afce5dd8 (tag: 8.3.241) Date: Mon Dec 13 18:05:53 2021 -0500 extflat/EFdef.c:97 void EFDone(int (*func)()); extflat/EFbuild.c:2180 void efFreeNodeList(EFNode *head, int (*func)()); CodeQL: https://github.com/dlmiles/magic/security/code-scanning/16 --- extflat/EFantenna.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extflat/EFantenna.c b/extflat/EFantenna.c index c0a9725e..3ee40a24 100644 --- a/extflat/EFantenna.c +++ b/extflat/EFantenna.c @@ -197,7 +197,7 @@ runantennacheck: if (err_result == TRUE) { - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } @@ -211,7 +211,7 @@ runantennacheck: if (w == (MagWindow *) NULL) { TxError("Point to a window or specify a cell name.\n"); - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } inName = ((CellUse *) w->w_surfaceID)->cu_def->cd_name; @@ -226,7 +226,7 @@ runantennacheck: TxPrintf("Reading extract file.\n"); if (EFReadFile(inName, FALSE, FALSE, FALSE, FALSE) == FALSE) { - EFDone(); + EFDone(NULL); return /* TCL_ERROR */; } @@ -257,7 +257,7 @@ runantennacheck: TxPrintf("Running antenna checks.\n"); EFVisitDevs(antennacheckVisit, (ClientData)editUse); EFFlatDone(NULL); - EFDone(); + EFDone(NULL); TxPrintf("antennacheck finished.\n"); freeMagic(EFDeviceTypes);