[U-Boot] [PATCH] sandbox: Fix comparison of unsigned enum expression warning
sjg at google.com
sjg at google.com
Wed Jun 7 01:47:41 UTC 2017
On 13 May 2017 at 18:11, Tom Rini <trini at konsulko.com> wrote:
> In os_dirent_get_typename() we are checking that type falls within the
> known values of the enum os_dirent_t. With clang-3.8 testing this value
> as being >= 0 results in a warning as it will always be true. This
> assumes of course that we are only given valid data. Given that we want
> to sanity check the input, we change this to check that it falls within
> the range of the first to the last entry in the given enum.
>
> Cc: Simon Glass <sjg at chromium.org>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> arch/sandbox/cpu/os.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Applied to u-boot-dm, thanks!
More information about the U-Boot
mailing list