[PATCH v2] eal: silence -Wconstant-logical-operand in RTE_IS_POWER_OF_2

Thomas Monjalon thomas at monjalon.net
Wed May 27 10:41:16 CEST 2026


19/05/2026 15:49, Stephen Hemminger:
> Newer GCC warns when a non-boolean constant is an operand of &&, which
> trips whenever RTE_IS_POWER_OF_2 is used in a static_assert with a
> power-of-two literal. Make the zero check explicit.
> 
> Fixes: 7c872b96983a ("hash: validate hash bucket entries while compiling")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> Acked-by: Jack Bond-Preston <jack.bond-preston at foss.arm.com>
> ---
> v2 - use suggestion to make both sides comparisons

Applied, thanks.





More information about the dev mailing list