calma/CalmaRdcl.c: calmaFindCell() Call to function with fewer arguments than declared parameters

The 'predefined' pointer argument to calmaFindCell() is for an optional return value, so must be
NULL when feature is not used.

Copilot Autofix rejected: newdef = calmaFindCell(newname, someSecondArgument);

calma/CalmaRdcl.c
1c822652 (2020-12-04 16:56:51 -0500 1359)     bool *predefined; /* If this cell was in memory before the GDS
1c822652 (2020-12-04 16:56:51 -0500 1360)                        * file was read, then this flag gets set.
1c822652 (2020-12-04 16:56:51 -0500 1361)                        */

commit 1c82265244 (tag: mpw-one-a, tag: 8.3.92)
Date:   Fri Dec 4 16:56:51 2020 -0500

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/6
        https://github.com/dlmiles/magic/security/code-scanning/5
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent 7feec63580
commit 1360f962a1
1 changed files with 2 additions and 2 deletions

View File

@ -267,7 +267,7 @@ calmaElementBoundary()
he = HashFind(&calmaDefInitHash, newname);
if (!HashGetValue(he))
{
newdef = calmaFindCell(newname, NULL);
newdef = calmaFindCell(newname, NULL, NULL);
cifReadCellDef = newdef;
DBCellClearDef(cifReadCellDef);
DBCellSetAvail(cifReadCellDef);
@ -673,7 +673,7 @@ calmaElementPath()
he = HashFind(&calmaDefInitHash, newname);
if (!HashGetValue(he))
{
newdef = calmaFindCell(newname, NULL);
newdef = calmaFindCell(newname, NULL, NULL);
cifReadCellDef = newdef;
DBCellClearDef(cifReadCellDef);
DBCellSetAvail(cifReadCellDef);