From 5ffc74d915f450f70f27e19ac2fd26020599ae11 Mon Sep 17 00:00:00 2001 From: Darryl Miles Date: Mon, 30 Sep 2024 07:14:32 +0100 Subject: [PATCH] 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> --- lef/defWrite.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lef/defWrite.c b/lef/defWrite.c index bb1b296b..96896a90 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -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 */ }