lef/defWrite.c: Multiplication result converted to larger type

Fix code scanning alert no. 53: Multiplication result converted to larger type (#48)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Darryl Miles 2024-09-30 07:14:32 +01:00 committed by Tim Edwards
parent 1a351efd56
commit 5ffc74d915
1 changed files with 1 additions and 2 deletions

View File

@ -2285,8 +2285,7 @@ defCountCompFunc(cellUse, total)
int sy = cellUse->cu_yhi - cellUse->cu_ylo + 1;
// TxPrintf("Diagnostic: cell %s %d %d\n", cellUse->cu_id, sx, sy);
ASSERT(sx >= 0 && sy >= 0, "Valid array");
(*total) += sx * sy; /* Increment the count of uses */
(*total) += (unsigned long)sx * sy; /* Increment the count of uses */
return 0; /* Keep the search going */
}