diff options
author | AKASHI Takahiro <takahiro.akashi@linaro.org> | 2019-11-26 10:11:22 +0900 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2019-12-03 20:54:05 +0100 |
commit | 0bffb8c46b109dcd8766e78c357147c07333f6b6 (patch) | |
tree | 3167f9e876bf1858bac971405e6329b54f927730 | |
parent | 1297989804d66c8db92efbf9fa2e6cc76965a943 (diff) | |
download | u-boot-0bffb8c46b109dcd8766e78c357147c07333f6b6.tar.gz |
cmd: efidebug: fix a build error in show_efi_boot_opt()
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>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r-- | cmd/efidebug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c index ef97e19d07..1fff4390de 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)); |