From nobody Sat Feb 7 10:15:53 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+110804+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+110804+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1699335547; cv=none; d=zohomail.com; s=zohoarc; b=RtmFR3KLQbpgcW2X3o8i+1xgwYPpgPIlAhuGOtRmDWd1i4+d6ITElRspoKNKj0Ie4lK9yN/bvs9DaFrJfjWXMtQB88Iq9Wjs6ULIjcZlBAHFNPesUiiTojNr8lWIKXnQEqnZqUdH+nZnoGiW3cPbWO1hksRJjvyITGcGPLxTLuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1699335547; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=iNaxPhguwOWrIHfCZiQudQLNQfz0fRpaBs8KmGbD79Y=; b=Raa/+QJOHpHGp6+ltWgSEqhhAlUhJF8ILNgMtpPVgmIhznUZ76aZUTvpZidqHmuVP8hD5SS9VcldmNYBNZKQ3/RcXWUjNgkK9yUMNR6r+r8i2kdhYXLrYxw4E5YqoJTEmTgfIlP2/FhtirsjDHSFMpfFBqrCNcEwItICIsVVmPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+110804+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1699335547622567.0125516207902; Mon, 6 Nov 2023 21:39:07 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=I7P7iD1V9/tS9uR8baGqXcGojDs7knpgStfG7Jx32r4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1699335547; v=1; b=qLvNjWOxQuquEViYKrN4pYRf/rJfh1PB+8DvSra4oPUhcxc+FD5j2bLe46mUVeKUyHW+WN35 2TyJXRRJYjYIf84SvGAtVGPGK1ugXT53BuUS7JkcbAlSb7jxbPHJ1CI5RMdqjholYU+hx74IZ34 Dv8B6fAWIdOo44Iv2/K0eM1s= X-Received: by 127.0.0.2 with SMTP id SUfPYY1788612xWEJVxfpUT1; Mon, 06 Nov 2023 21:39:07 -0800 X-Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by mx.groups.io with SMTP id smtpd.web11.4245.1699335546682343715 for ; Mon, 06 Nov 2023 21:39:06 -0800 X-Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-359974f4c7eso10287755ab.1 for ; Mon, 06 Nov 2023 21:39:06 -0800 (PST) X-Gm-Message-State: WQZrMsE9X3jgC4zHrRbuBY4Ax1787277AA= X-Google-Smtp-Source: AGHT+IFmgux9IP/RvbQg6AVc+0p4VHtMDkr8gINLicnVzg9B6INcY9S15RS18lBvHkMq/+edIUqjhA== X-Received: by 2002:a92:c269:0:b0:358:21a:25f9 with SMTP id h9-20020a92c269000000b00358021a25f9mr2053734ild.20.1699335545607; Mon, 06 Nov 2023 21:39:05 -0800 (PST) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1f24:775d:7335:84a5:7d11:9393]) by smtp.gmail.com with ESMTPSA id r5-20020a92c5a5000000b00357ff86c542sm2953080ilt.4.2023.11.06.21.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 21:39:05 -0800 (PST) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Ray Ni , Laszlo Ersek Subject: [edk2-devel] [PATCH v3 2/2] MdeModulePkg/Bus/Usb/UsbMouseDxe: Fix MISSING_BREAK Coverity issues Date: Tue, 7 Nov 2023 11:08:53 +0530 Message-Id: <20231107053853.76448-3-rsingh@ventanamicro.com> In-Reply-To: <20231107053853.76448-1-rsingh@ventanamicro.com> References: <20231107053853.76448-1-rsingh@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rsingh@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1699335549345100011 Content-Type: text/plain; charset="utf-8" The function GetNextHidItem has a switch-case block in which the case 1: falls through to case 2: and then case 2: falls through to case 3:. There is no possibility of the if blocks within case 2: and case 3: to succeed later and not succeed in the original case and hence the fall throughs even if it hypothetically happens are redundant as the code still will eventually return NULL only at the function end point. Better introduce straight forward break; statement within actual cases. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4222 Cc: Ray Ni Signed-off-by: Ranbir Singh Reviewed-by: Laszlo Ersek --- MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c b/MdeModulePkg/Bus= /Usb/UsbMouseDxe/MouseHid.c index acc19acd98e0..f07e48774a34 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c @@ -89,6 +89,8 @@ GetNextHidItem ( return StartPos; } =20 + break; + case 2: // // 2-byte data @@ -99,6 +101,8 @@ GetNextHidItem ( return StartPos; } =20 + break; + case 3: // // 4-byte data, adjust size @@ -109,6 +113,8 @@ GetNextHidItem ( StartPos +=3D 4; return StartPos; } + + break; } } =20 --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110804): https://edk2.groups.io/g/devel/message/110804 Mute This Topic: https://groups.io/mt/102437987/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-