aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2023-07-28 16:31:51 -0400
committerDave Wallace <dwallacelf@gmail.com>2023-07-28 16:36:22 -0400
commit054229ebbdeb3f87d96c1abf93b511c86cd6ff0f (patch)
tree470f5f53a90dd7715bdf1df80af68fdfa18d0eb5
parent543cd57ea2fa2191804e0e1893fa2c34a37f0088 (diff)
vlib: fix gcc build breakage
Type: fix Fixes: 00ea98ad6 Change-Id: I4ac8c9c5902299d5f283ba4912d52d9bfcedef5c Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
-rw-r--r--src/vlib/pci/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vlib/pci/pci.c b/src/vlib/pci/pci.c
index b6a9416cbc3..dc4f382140e 100644
--- a/src/vlib/pci/pci.c
+++ b/src/vlib/pci/pci.c
@@ -176,6 +176,9 @@ vlib_pci_function_level_reset (vlib_main_t *vm, vlib_pci_dev_handle_t h)
return err;
offset = cfg.cap_ptr;
+ /* Make gcc happy, otherwise gcc fails build due to cap not set if offset ==
+ * 0 */
+ cap = (pci_capability_pcie_t *) (cfg.data + offset);
while (offset)
{
@@ -410,4 +413,3 @@ VLIB_CLI_COMMAND (show_pci_command, static) = {
.short_help = "show pci [all]",
.function = show_pci_fn,
};
-