OVS team reports PMD compilation failed under: gcc (Ubuntu
13.2.0-4ubuntu3) 13.2.0

In function ‘mlx5dr_action_create_push_ipv6_route_ext_mhdr2’,
../drivers/net/mlx5/hws/mlx5dr_action.c:2701:64:
  ‘ipv6_dst_addr’ may be used uninitialized

Only shared action needs to query the IPv6 destination address
when creating dr_action. This is a false alert. Initialize it
to NULL to fix the warning.

Fixes: a50f6d3fe58d ("net/mlx5/hws: add IPv6 routing extension push remove 
actions")
Signed-off-by: Rongwei Liu <rongw...@nvidia.com>
Reviewed-by: Alex Vesker <va...@nvidia.com>
Acked-by: Ori Kam <or...@nvidia.com>
---
 drivers/net/mlx5/hws/mlx5dr_action.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/hws/mlx5dr_action.c 
b/drivers/net/mlx5/hws/mlx5dr_action.c
index 719d546424..43a65bdfd1 100644
--- a/drivers/net/mlx5/hws/mlx5dr_action.c
+++ b/drivers/net/mlx5/hws/mlx5dr_action.c
@@ -2326,8 +2326,8 @@ mlx5dr_action_create_push_ipv6_route_ext_mhdr2(struct 
mlx5dr_action *action,
                MLX5_MODI_OUT_DIPV6_31_0
        };
        struct mlx5dr_action_mh_pattern pattern;
+       uint32_t *ipv6_dst_addr = NULL;
        uint8_t seg_left, next_hdr;
-       uint32_t *ipv6_dst_addr;
        __be64 cmd[5] = {0};
        uint16_t mod_id;
        uint32_t i;
-- 
2.27.0

Reply via email to