From patchwork Sat May 9 16:03:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 245374 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Sat, 9 May 2020 18:03:29 +0200 Subject: [PATCH 1/1] cmd: efidebug: fix -Werror=type-limits warning Message-ID: <20200509160329.101737-1-xypron.glpk@gmx.de> Compiling with -Wtype-limits yields: cmd/efidebug.c:968:32: error: comparison is always false due to limited range of data type [-Werror=type-limits] 968 | if (*endp != '\0' || bootnext > 0xffff) { | Remove the superfluous check. Fixes: 59df7e7e77e7 ("cmd: add efidebug command") Signed-off-by: Heinrich Schuchardt --- cmd/efidebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.26.2 diff --git a/cmd/efidebug.c b/cmd/efidebug.c index d8a76d78a3..85ba9f11f8 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -965,7 +965,7 @@ static int do_efi_boot_next(cmd_tbl_t *cmdtp, int flag, return CMD_RET_USAGE; bootnext = (u16)simple_strtoul(argv[1], &endp, 16); - if (*endp != '\0' || bootnext > 0xffff) { + if (*endp != '\0') { printf("invalid value: %s\n", argv[1]); r = CMD_RET_FAILURE; goto out;