From: Adrian Bunk <bunk@stusta.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH] flashrom: Fix build with clang
Date: Mon, 16 Mar 2020 10:02:39 +0200 [thread overview]
Message-ID: <20200316080239.GB14992@localhost> (raw)
In-Reply-To: <20200316000654.1093220-1-raj.khem@gmail.com>
On Sun, Mar 15, 2020 at 05:06:54PM -0700, Khem Raj wrote:
>...
> +clang complains like below
> +
> +libflashrom.c:191:43: error: implicit conversion from enumeration type 'const enum test_state' to different enumeration type 'enum flashrom_test_state' [-Werror,-Wenum-conversion]
> + supported_boards[i].working = binfo[i].working;
> + ~ ~~~~~~~~~^~~~~~~
> +libflashrom.c:229:46: error: implicit conversion from enumeration type 'const enum test_state' to different enumeration type 'enum flashrom_test_state' [-Werror,-Wenum-conversion]
> + supported_chipsets[i].status = chipset[i].status;
Please patch out the -Werror instead.
>...
> +However these enums are exactly same so they can be typecasted
If they are the same, the correct fix would be to have only one enum.
>...
> +Upstream-Status: Pending
>...
> +- supported_boards[i].working = binfo[i].working;
> ++ supported_boards[i].working = (enum flashrom_test_state)binfo[i].working;
>...
Working around a compile warning by making the code worse is not
an improvement.
Even worse when this is an OE-only workaround.
cu
Adrian
next prev parent reply other threads:[~2020-03-16 8:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 0:06 [meta-oe][PATCH] flashrom: Fix build with clang Khem Raj
2020-03-16 8:02 ` Adrian Bunk [this message]
2020-03-16 18:40 ` Khem Raj
-- strict thread matches above, loose matches on Subject: below --
2025-03-13 18:38 Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200316080239.GB14992@localhost \
--to=bunk@stusta.de \
--cc=openembedded-devel@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.