]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c
UefiCpuPkg/MpInitLib: Remove Executable attribute from MpLib.h
[mirror_edk2.git] / OvmfPkg / Library / BasePciCapLib / BasePciCapLib.c
index 4968d2b478db48a6c74907be067abc21669dfb4c..c6f2c726509f33aa1958fd7cfa3cd1d6110845a7 100644 (file)
@@ -303,6 +303,13 @@ InsertPciCap (
   // not the first instance of (Domain, CapId).\r
   //\r
   if (PciCap->Key.Instance > 0) {\r
+    //\r
+    // Suppress invalid "nullptr dereference" compiler/analyzer warnings: the\r
+    // only way for "PciCap->Key.Instance" to be positive here is for it to\r
+    // have been assigned *from* dereferencing "InstanceZero" above.\r
+    //\r
+    ASSERT (InstanceZero != NULL);\r
+\r
     InstanceZero->NumInstancesUnion.NumInstances++;\r
   }\r
   return RETURN_SUCCESS;\r