From: Tom Rini Date: Sun, 28 May 2017 12:49:51 +0000 (-0400) Subject: cmd/ethsw: Disable implicit enum conversion warning X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=18b29165854ba180ce3348e404f11a3e988fc726;p=u-boot.git 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. Cc: Codrin Ciubotariu Cc: Joe Hershberger Signed-off-by: Tom Rini Acked-by: Joe Hershberger --- diff --git a/cmd/Makefile b/cmd/Makefile index 9ea56e9977..b92e42df32 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -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