\r
Copyright (C) 2018, Red Hat, Inc.\r
\r
- This program and the accompanying materials are licensed and made available\r
- under the terms and conditions of the BSD License which accompanies this\r
- distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
- WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
**/\r
\r
#include <IndustryStandard/PciExpress21.h>\r
// 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