ext2sim/ext2sim.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 5e3c26c95a (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/11
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent 1360f962a1
commit d2ae7f78e8
1 changed files with 5 additions and 5 deletions

View File

@ -534,7 +534,7 @@ runexttosim:
if (err_result == TRUE) if (err_result == TRUE)
{ {
EFDone(); EFDone(NULL);
return /* TCL_ERROR */; return /* TCL_ERROR */;
} }
@ -548,7 +548,7 @@ runexttosim:
if (w == (MagWindow *) NULL) if (w == (MagWindow *) NULL)
{ {
TxError("Point to a window or specify a cell name.\n"); TxError("Point to a window or specify a cell name.\n");
EFDone(); EFDone(NULL);
return /* TCL_ERROR */; return /* TCL_ERROR */;
} }
inName = ((CellUse *) w->w_surfaceID)->cu_def->cd_name; inName = ((CellUse *) w->w_surfaceID)->cu_def->cd_name;
@ -585,7 +585,7 @@ runexttosim:
#else #else
TxError("exttosim: Unable to open file %s for writing\n", simesOutName); TxError("exttosim: Unable to open file %s for writing\n", simesOutName);
#endif #endif
EFDone(); EFDone(NULL);
return /* TCL_ERROR */; return /* TCL_ERROR */;
} }
if (!esNoAlias && (esAliasF = fopen(esAliasName, "w")) == NULL) if (!esNoAlias && (esAliasF = fopen(esAliasName, "w")) == NULL)
@ -598,7 +598,7 @@ runexttosim:
#else #else
TxError("exttosim: Unable to open file %s for writing\n", esAliasName); TxError("exttosim: Unable to open file %s for writing\n", esAliasName);
#endif #endif
EFDone(); EFDone(NULL);
return /* TCL_ERROR */; return /* TCL_ERROR */;
} }
if (!esNoLabel && (esLabF = fopen(esLabelName, "w")) == NULL) if (!esNoLabel && (esLabF = fopen(esLabelName, "w")) == NULL)
@ -617,7 +617,7 @@ runexttosim:
/* Read the hierarchical description of the input circuit */ /* Read the hierarchical description of the input circuit */
if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE, FALSE) == FALSE) if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE, FALSE) == FALSE)
{ {
EFDone(); EFDone(NULL);
return /* TCL_ERROR */; return /* TCL_ERROR */;
} }