From nobody Sun Feb 8 18:29:29 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+109457+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+109457+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1696850923; cv=none; d=zohomail.com; s=zohoarc; b=Rlv7hJXtRIh0CbFJBes+05oaQDT58tp6Fd5mz52IVymGkWpoJXv6TUWlrpEl8FbFd0kYVpBTtz5YwvOptVGgwGeDIclren4bwrSlSYUmqYbHh4OXndom6xeLGQO+ZK7UQxTOiz1uklFUJEHP05p/xZVf38UIUZCzzcRCGltIllY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1696850923; 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=A+WNn/MyprfrffIffHCm7xqQNqto0IqXa2shgyoUyOM=; b=KFaclIcjUVF9fjehtcWGaWh5WT/gv73+38ytcfx4Lk/cVKLcPL+so34kzf8wFzLDdmjoMvrWD9qoaNcG83tInpdy3Sa1h7xTmxkk3EmP17vw8YaXmf6Q8zAO8C/eSdSMVRQvDP2SJMFbUJ1r4gUUy19JHRaSAIUPOX3fjkyegBo= 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+109457+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1696850923512389.2872029726203; Mon, 9 Oct 2023 04:28:43 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=ts/xTqqP93CxxqzZ4J2YlCcLv6Ro6PnSkTEWEdfrG9g=; 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=1696850922; v=1; b=e4GM0x7HgIJ3O3XYQnsgfmzFamhgmD3vbCo6aplduwe3DJIakMTVqvOIcAoMKipDc07QLI1U QAZmGjaqeNfnEsBj3TNN73Emgex2a4I4puuUy+Jt0n8IZKtT0IsAhEjNCzkExAhlOrPlVBsOgkp BE6NBfLIZpyPcLKHhlzEM45I= X-Received: by 127.0.0.2 with SMTP id yiDqYY1788612xVj3hRaPGPm; Mon, 09 Oct 2023 04:28:42 -0700 X-Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mx.groups.io with SMTP id smtpd.web10.59237.1696850922436459584 for ; Mon, 09 Oct 2023 04:28:42 -0700 X-Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-278fde50024so4072625a91.1 for ; Mon, 09 Oct 2023 04:28:42 -0700 (PDT) X-Gm-Message-State: DW7oskuROzACItRWVL8TW7EJx1787277AA= X-Google-Smtp-Source: AGHT+IEafGkPQkU/D4w6pDPcGepfW5zQHf8FC1eY/qWbNjWnxXNgua9pnmkCtqHWB+mc3x8UvP3obQ== X-Received: by 2002:a17:90a:1c0f:b0:263:f521:da3e with SMTP id s15-20020a17090a1c0f00b00263f521da3emr18339486pjs.2.1696850921071; Mon, 09 Oct 2023 04:28:41 -0700 (PDT) X-Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1cbd:fb:a57a:2893:69ae:bff3]) by smtp.gmail.com with ESMTPSA id m20-20020a17090a7f9400b00262ca945cecsm9993713pjl.54.2023.10.09.04.28.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 04:28:40 -0700 (PDT) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Hao A Wu , Ray Ni Subject: [edk2-devel] [PATCH v2 2/2] MdeModulePkg/Bus/Usb/UsbMouseDxe: Fix MISSING_BREAK Coverity issues Date: Mon, 9 Oct 2023 16:58:32 +0530 Message-Id: <20231009112832.225861-3-rsingh@ventanamicro.com> In-Reply-To: <20231009112832.225861-1-rsingh@ventanamicro.com> References: <20231009112832.225861-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: 1696850924102100009 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: Hao A Wu 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 (#109457): https://edk2.groups.io/g/devel/message/109457 Mute This Topic: https://groups.io/mt/101849998/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-