From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 790DF780091 for ; Wed, 4 Oct 2023 05:48:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=YWB0F6ARTZhVpTCkVvz5lRhJm9Oh3SkLsKFC1zxTJ2w=; 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=1696398508; v=1; b=NRqyZGot7lI0c8a8HUVmUvx6S0eBwfWBBd3H4NtIl1ywePBE7oK08jIWWpiPEceP6RdJ3yOM 8WlY1C/bvW0fIBXRv8dLwuE3Hdd48KuMrlWKHrXi6i9X0slutIFWwnHQP6vocfAxtbpcPMridNo IfIpVKK30/cny+jZFyOa3ZAI= X-Received: by 127.0.0.2 with SMTP id ZHyZYY7687511x6GhCaYcDb9; Tue, 03 Oct 2023 22:48:28 -0700 X-Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mx.groups.io with SMTP id smtpd.web11.12281.1696398507433784275 for ; Tue, 03 Oct 2023 22:48:27 -0700 X-Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1c63164a2b6so4451065ad.0 for ; Tue, 03 Oct 2023 22:48:27 -0700 (PDT) X-Gm-Message-State: VWmvJl54Z6mY7SzPwZu9FkxYx7686176AA= X-Google-Smtp-Source: AGHT+IHD/hzVtGpvkqoMVjYjtNawYwc+cV3UjjhvY6dbHCJTPEcCDbs2aThMC0p0R2KNXXoxYnlgng== X-Received: by 2002:a17:902:d491:b0:1c7:2e8f:c3b5 with SMTP id c17-20020a170902d49100b001c72e8fc3b5mr2142310plg.20.1696398506710; Tue, 03 Oct 2023 22:48:26 -0700 (PDT) X-Received: from user-Latitude-5420.. ([106.51.83.242]) by smtp.gmail.com with ESMTPSA id l12-20020a170903244c00b001c0bf60ba5csm2668777pls.272.2023.10.03.22.48.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 22:48:26 -0700 (PDT) From: "Ranbir Singh" To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Hao A Wu , Ray Ni , Veeresh Sangolli Subject: [edk2-devel] [PATCH v1 2/2] MdeModulePkg/Bus/Usb/UsbMouseDxe: Fix MISSING_BREAK Coverity issues Date: Wed, 4 Oct 2023 11:18:18 +0530 Message-Id: <20231004054818.100353-3-rsingh@ventanamicro.com> In-Reply-To: <20231004054818.100353-1-rsingh@ventanamicro.com> References: <20231004054818.100353-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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=NRqyZGot; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io From: Ranbir Singh The function GetNextHidItem has a switch-case code in which the case 1: falls through to case 2: and then case 2: falls through to case 3: in the block. While this may be intentional, it is not evident to any general code reader as well as any static analyzer tool. Just adding // No break; here as this is an intentional fallthrough. as comment in between makes a reader as well as Coverity happy. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4222 Cc: Hao A Wu Cc: Ray Ni Co-authored-by: Veeresh Sangolli Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c b/MdeModulePkg/Bus= /Usb/UsbMouseDxe/MouseHid.c index acc19acd98e0..bc9a4824208b 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c @@ -89,6 +89,10 @@ GetNextHidItem ( return StartPos;=0D }=0D =0D + //=0D + // No break; here as this is an intentional fallthrough=0D + //=0D +=0D case 2:=0D //=0D // 2-byte data=0D @@ -99,6 +103,10 @@ GetNextHidItem ( return StartPos;=0D }=0D =0D + //=0D + // No break; here as this is an intentional fallthrough=0D + //=0D +=0D case 3:=0D //=0D // 4-byte data, adjust size=0D --=20 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109309): https://edk2.groups.io/g/devel/message/109309 Mute This Topic: https://groups.io/mt/101750274/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-