From 0462c1301e6d443574ca4161801cabec511d22f7 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Thu, 19 Dec 2024 16:24:54 +0100 Subject: [PATCH] fix sudden increase of complexity due to incorrect type (long instead of unsigned int) in the BASOP counter reset function --- lib_debug/wmc_auto.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_debug/wmc_auto.c b/lib_debug/wmc_auto.c index 731b01e1c..ce4cc993d 100644 --- a/lib_debug/wmc_auto.c +++ b/lib_debug/wmc_auto.c @@ -2499,11 +2499,11 @@ long DeltaWeightedOperation( unsigned int CounterId ) void Reset_BASOP_WMOPS_counter( unsigned int counterId ) { int i; - long *ptr; + unsigned int *ptr; /* reset the current BASOP operation counter */ - ptr = (long *) &multiCounter[counterId]; - for ( i = 0; i < (int) ( sizeof( multiCounter[counterId] ) / sizeof( long ) ); i++ ) + ptr = (unsigned int *) &multiCounter[counterId]; + for ( i = 0; i < (int) (sizeof(BASIC_OP) / sizeof(unsigned int)); i++ ) { *ptr++ = 0; } -- GitLab