From 566fe957730ddd523930ae1a82ec7bdee48e87af Mon Sep 17 00:00:00 2001 From: Andre Muezerie Date: Thu, 14 May 2026 16:53:59 -0400 Subject: [PATCH] netvmini/rssv2: fix mixed-width comparison in processor lookup loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary This PR addresses a static-analysis warning in rssv2.c related to comparing values of different integer widths in a loop condition. Changes - Updated the loop index type in NICSetRSSv2FindProcessorInRssSet from UINT8 to ULONG to match RssProcessorCount width. - Added an explicit cast when returning the found index: return (UINT8)index; to preserve the function’s return type and behavior. Why Using matching integer widths in loop comparisons avoids analyzer warnings and reduces risk of subtle boundary issues. Impact No functional behavior change is intended; this is a type-safety and code-quality fix for warning cleanup. --- network/ndis/netvmini/6x/rssv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/ndis/netvmini/6x/rssv2.c b/network/ndis/netvmini/6x/rssv2.c index 1f8efb0e9..3f185c8a6 100644 --- a/network/ndis/netvmini/6x/rssv2.c +++ b/network/ndis/netvmini/6x/rssv2.c @@ -210,7 +210,7 @@ Return Value: --*/ { - UINT8 index; + ULONG index; PNDIS_RSS_PROCESSOR processor; for (index = 0; @@ -222,7 +222,7 @@ Return Value: if ((processor->ProcNum.Group == ProcessorNumber.Group) && (processor->ProcNum.Number == ProcessorNumber.Number)) { - return index; + return (UINT8)index; } }