cmd/ethsw: Disable implicit enum conversion warning
PATCH 1/1 cmd/ethsw: Disable implicit enum conversion warning
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.
--- cmd/Makefile | 2 ++ 1 file changed, 2 insertions(+)
cmd/Makefile +2 -0
@@ -192,3 +192,5 @@ $(obj)/license_data_gz.h: $(obj)/license_data.gz FORCE targets += license_data_size.h $(obj)/license_data_size.h: $(srctree)/Licenses/gpl-2.0.txt FORCE $(call filechk,data_size) + +CFLAGS_ethsw.o := -Wno-enum-conversion
Signature · 1 line
1.9.1
PATCH 1/1 cmd/ethsw: Disable implicit enum conversion warning
Quoted 13 lines · Tom Rini
With clang-3.8 we see warnings like:
cmd/ethsw.c:304:6: warning: implicit conversion from
enumeration type 'enumethsw_keyword_opt_id' to different enumeration type 'enumethsw_keyword_id' [-Wenum-conversion]
ethsw_id_pvid_no, ^~~~~~~~~~~~~~~~Because we have one enum for
ethsw_keyword_idand a second enum forethsw_keyword_opt_id. This ends up being safe asethsw_keyword_opt_id
explicitly starts afterethsw_keyword_idenum ends. Disable the
warning here rather than collapse these into one enum and rely on comments to denote where optional keywords begin.
Quoted 3 lines
Cc Codrin Ciubotariu <[email protected]>Cc Joe Hershberger <[email protected]>Signed-off-by Tom Rini <[email protected]>
Quoted 13 lines · Tom Rini
With clang-3.8 we see warnings like:
cmd/ethsw.c:304:6: warning: implicit conversion from
enumeration type 'enumethsw_keyword_opt_id' to different enumeration type 'enumethsw_keyword_id' [-Wenum-conversion]
ethsw_id_pvid_no, ^~~~~~~~~~~~~~~~Because we have one enum for
ethsw_keyword_idand a second enum forethsw_keyword_opt_id. This ends up being safe asethsw_keyword_opt_id
explicitly starts afterethsw_keyword_idenum ends. Disable the
warning here rather than collapse these into one enum and rely on comments to denote where optional keywords begin.
Quoted 4 lines
Cc Codrin Ciubotariu <[email protected]>Cc Joe Hershberger <[email protected]>Signed-off-by Tom Rini <[email protected]>Acked-by Joe Hershberger <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/bdc42a99/attachment.sig>