From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] cmd: efidebug: fix a build error in show_efi_boot_opt()
Date: Tue, 26 Nov 2019 10:11:22 +0900 [thread overview]
Message-ID: <20191126011122.31991-1-takahiro.akashi@linaro.org> (raw)
I detected the following error in sandbox with Clang on Travis CI:
+cmd/efidebug.c:703:15: error: result of comparison of constant
9223372036854775822 with expression of type 'int' is always false
[-Werror,-Wtautological-constant-out-of-range-compare]
+ else if (ret == EFI_NOT_FOUND)
+ ~~~ ^ ~~~~~~~~~~~~~
Simply changing a type of 'ret' to efi_status_t will fix this error.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
cmd/efidebug.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index ef97e19d0735..1fff4390deae 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -684,7 +684,7 @@ static void show_efi_boot_opt(int id)
efi_guid_t guid;
void *data = NULL;
efi_uintn_t size;
- int ret;
+ efi_status_t ret;
sprintf(var_name, "Boot%04X", id);
p = var_name16;
@@ -693,7 +693,7 @@ static void show_efi_boot_opt(int id)
size = 0;
ret = EFI_CALL(RT->get_variable(var_name16, &guid, NULL, &size, NULL));
- if (ret == (int)EFI_BUFFER_TOO_SMALL) {
+ if (ret == EFI_BUFFER_TOO_SMALL) {
data = malloc(size);
ret = EFI_CALL(RT->get_variable(var_name16, &guid, NULL, &size,
data));
--
2.24.0
next reply other threads:[~2019-11-26 1:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 1:11 AKASHI Takahiro [this message]
2019-11-26 1:17 ` [U-Boot] [PATCH v2] cmd: efidebug: fix a build error in show_efi_boot_opt() Heinrich Schuchardt
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=20191126011122.31991-1-takahiro.akashi@linaro.org \
--to=takahiro.akashi@linaro.org \
--cc=u-boot@lists.denx.de \
/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.