From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Tue, 26 Nov 2019 10:10:41 +0900 Subject: [U-Boot] [PATCH] cmd: efidebug: fix a build error in show_efi_boot_opt() In-Reply-To: <38a19175-0d3b-c86f-1b43-1b92205dc8c2@gmx.de> References: <20191126005757.31550-1-takahiro.akashi@linaro.org> <38a19175-0d3b-c86f-1b43-1b92205dc8c2@gmx.de> Message-ID: <20191126011040.GF22427@linaro.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Nov 26, 2019 at 02:01:53AM +0100, Heinrich Schuchardt wrote: > On 11/26/19 1:57 AM, AKASHI Takahiro wrote: > >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 > >--- > > cmd/efidebug.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >diff --git a/cmd/efidebug.c b/cmd/efidebug.c > >index ef97e19d0735..09ac84e5ef0a 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; > > > > Thanks for reporting this issue. > > Please, adjust this line too: > > if (ret == (int)EFI_BUFFER_TOO_SMALL) { Sure. -Takahiro Akashi > Best regards > > Heinrich