From: Ranbir Singh <ranbir.sin...@dell.com> The function UpdatePciInfo has switch-case code in which there are fall through from case 32: to case 64:. While this is seeemingly intentional, it is not evident to any static analyzer tool. Just adding
// No break; here as this is an intentional fallthrough. as explicit comment in between makes a reader as well as Coverity happy. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4239 Cc: Hao A Wu <hao.a...@intel.com> Cc: Ray Ni <ray...@intel.com> Co-authored-by: Veeresh Sangolli <veeresh.sango...@dellteam.com> Signed-off-by: Ranbir Singh <ranbir.sin...@dell.com> Signed-off-by: Ranbir Singh <rsi...@ventanamicro.com> --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 6594b8eae83f..eda97285ee18 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1428,6 +1428,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) { case 32: PciIoDevice->PciBar[BarIndex].BarType = PciBarTypeMem32; + // + // No break; here as this is an intentional fall through. + // case 64: PciIoDevice->PciBar[BarIndex].BarTypeFixed = TRUE; break; @@ -1440,6 +1443,9 @@ UpdatePciInfo ( switch (Ptr->AddrSpaceGranularity) { case 32: PciIoDevice->PciBar[BarIndex].BarType = PciBarTypePMem32; + // + // No break; here as this is an intentional fall through. + // case 64: PciIoDevice->PciBar[BarIndex].BarTypeFixed = TRUE; break; -- 2.34.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109109): https://edk2.groups.io/g/devel/message/109109 Mute This Topic: https://groups.io/mt/101612808/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-