[PATCH v3 0/5] use static_assert to catch build errors
Stephen Hemminger
stephen at networkplumber.org
Tue Jan 16 19:41:10 CET 2024
This series fixes a couple places where expressions that could not
be evaluated as constant early in compiler passes were used. And then
converts RTE_BUILD_BUG_ON() with static_assert.
static_assert() is more picky about the expression has to
be a constant, which also catches some existing undefined
behavior that pre-existed.
Stephen Hemminger (5):
event/opdl: fix non-constant compile time assertion
net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON()
net/i40e: avoid using const variable in assertion
mempool: avoid floating point expression in static assertion
eal: replace out of bounds VLA with static_assert
drivers/event/opdl/opdl_ring.c | 5 ++++-
drivers/net/i40e/i40e_ethdev.h | 1 +
drivers/net/i40e/i40e_rxtx_vec_sse.c | 10 ++++------
drivers/net/sfc/sfc_ef100_tx.c | 7 +++++--
lib/eal/include/rte_common.h | 3 ++-
lib/mempool/rte_mempool.c | 4 +---
6 files changed, 17 insertions(+), 13 deletions(-)
--
2.43.0
More information about the dev
mailing list