Re: [PATCH v4] common/sfc: replace out of bounds condition with static_assert

2024-02-13 Thread Ferruh Yigit
On 2/12/2024 5:48 AM, Stephen Hemminger wrote: > The sfc base code had its own definition of static assertions > using the out of bound array access hack. Replace it with a > static_assert like rte_common.h. > > The use of null pointer to compute offset is not always a constant > in older versions

Re: [PATCH v4] common/sfc: replace out of bounds condition with static_assert

2024-02-12 Thread Ferruh Yigit
On 2/12/2024 5:48 AM, Stephen Hemminger wrote: > The sfc base code had its own definition of static assertions > using the out of bound array access hack. Replace it with a > static_assert like rte_common.h. > > The use of null pointer to compute offset is not always a constant > in older versions

[PATCH v4] common/sfc: replace out of bounds condition with static_assert

2024-02-11 Thread Stephen Hemminger
The sfc base code had its own definition of static assertions using the out of bound array access hack. Replace it with a static_assert like rte_common.h. The use of null pointer to compute offset is not always a constant in older versions of clang. Use standard offsetof() instead. Fixes: f67e471