From ee9d4df081a625ef0b36f88206abf591f6ddc026 Mon Sep 17 00:00:00 2001 From: "Darryl L. Miles" Date: Fri, 4 Oct 2024 20:29:15 +0100 Subject: [PATCH] lefRead.c: LefError() add ASSERT(type) for incorrect caller usage 'type' maybe used as array index without being initialized. Sonarcloud Array subscript is undefined https://sonarcloud.io/project/issues?open=AZJB17LDNGfDNup0Rjyn&id=dlmiles_magic --- lef/lefRead.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lef/lefRead.c b/lef/lefRead.c index de347c11..22f526ea 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -349,6 +349,10 @@ LefError(int type, char *fmt, ...) mode = 1; level = -1; break; + default: + ASSERT(FALSE, "type"); + return; + break; } lefdeftype = lefdeftypes[mode];