[U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning

Joe Hershberger joe.hershberger at ni.com
Tue May 30 16:51:15 UTC 2017


On Sun, May 28, 2017 at 7:49 AM, Tom Rini <trini at konsulko.com> wrote:
> With clang-3.8 we see warnings like:
> cmd/ethsw.c:304:6: warning: implicit conversion from
>       enumeration type 'enum ethsw_keyword_opt_id' to different enumeration type
>       'enum ethsw_keyword_id' [-Wenum-conversion]
>                                         ethsw_id_pvid_no,
>                                         ^~~~~~~~~~~~~~~~
>
> Because we have one enum for ethsw_keyword_id and a second enum for
> ethsw_keyword_opt_id.  This ends up being safe as ethsw_keyword_opt_id
> explicitly starts after ethsw_keyword_id enum ends.   Disable the
> warning here rather than collapse these into one enum and rely on
> comments to denote where optional keywords begin.
>
> Cc: Codrin Ciubotariu <codrin.ciubotariu at freescale.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>

Acked-by: Joe Hershberger <joe.hershberger at ni.com>


More information about the U-Boot mailing list