* [U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning
@ 2017-05-28 12:49 Tom Rini
2017-05-30 16:51 ` Joe Hershberger
2017-06-06 0:22 ` [U-Boot] " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rini @ 2017-05-28 12:49 UTC (permalink / raw)
To: u-boot
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@freescale.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
cmd/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cmd/Makefile b/cmd/Makefile
index 9ea56e99778a..b92e42df32e6 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
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning
2017-05-28 12:49 [U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning Tom Rini
@ 2017-05-30 16:51 ` Joe Hershberger
2017-06-06 0:22 ` [U-Boot] " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Joe Hershberger @ 2017-05-30 16:51 UTC (permalink / raw)
To: u-boot
On Sun, May 28, 2017 at 7:49 AM, Tom Rini <trini@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@freescale.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] cmd/ethsw: Disable implicit enum conversion warning
2017-05-28 12:49 [U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning Tom Rini
2017-05-30 16:51 ` Joe Hershberger
@ 2017-06-06 0:22 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2017-06-06 0:22 UTC (permalink / raw)
To: u-boot
On Sun, May 28, 2017 at 08:49:51AM -0400, Tom Rini 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@freescale.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Applied to u-boot/master, thanks!
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-06 0:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-28 12:49 [U-Boot] [PATCH] cmd/ethsw: Disable implicit enum conversion warning Tom Rini
2017-05-30 16:51 ` Joe Hershberger
2017-06-06 0:22 ` [U-Boot] " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.