[dpdk-dev] [PATCH] net/bnxt: fix clang compiler warnings

Ajit Khaparde ajit.khaparde at broadcom.com
Tue Oct 12 06:08:58 CEST 2021


On Mon, Oct 11, 2021 at 7:46 PM Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> On Sat,  9 Oct 2021 21:07:55 -0700
> Ajit Khaparde <ajit.khaparde at broadcom.com> wrote:
>
> > +             if ((uint32_t)item->type >=
> > +                 (uint32_t)BNXT_RTE_FLOW_ITEM_TYPE_END) {
>
>
> This doesn't look right, you are casting away your troubles, not addressing
> the root cause.
>
> item->type is type rte_flow_item_type
> BNXT_FLOW_ITEM_TYPE_END is the first item in that enum.
>
> So yes the warning is valid and the code is wrong.
Thanks. We will work on the proper fix.


More information about the dev mailing list