Acked-by: Vladimir Medvedkin <vladimir.medved...@intel.com>

On 7/23/2025 2:31 PM, David Marchand wrote:
Without an explicit type, ip_xor gets promoted to a int.

../lib/rib/rte_rib6.c:348:26: runtime error:
        left shift of 130 by 24 places cannot be represented in type 'int'

Signed-off-by: David Marchand <david.march...@redhat.com>
---
  lib/rib/rte_rib6.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/rib/rte_rib6.c b/lib/rib/rte_rib6.c
index ded5fd044f..ec8ff68e87 100644
--- a/lib/rib/rte_rib6.c
+++ b/lib/rib/rte_rib6.c
@@ -352,7 +352,7 @@ rte_rib6_insert(struct rte_rib6 *rib,
                if (ip_xor == 0)
                        d += 8;
                else {
-                       d += rte_clz32(ip_xor << 24);
+                       d += rte_clz32((uint32_t)ip_xor << 24);
                        break;
                }
        }

--
Regards,
Vladimir

Reply via email to