From: Heinrich Schuchardt Date: Fri, 11 Jan 2019 21:35:54 +0100 Subject: [U-Boot] [PATCH v2 1/7] efi_loader: Add a wchar_t cast in efi_file_open() In-Reply-To: References: <20190107234424.167742-1-sjg@chromium.org> <20190107234424.167742-2-sjg@chromium.org> Message-ID: <1323d9d9-5f1a-3827-c2a4-68ab79db10d2@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 1/11/19 9:08 PM, Heinrich Schuchardt wrote: > On 1/8/19 12:44 AM, Simon Glass wrote: >> The printf() string here is not actually correct. Add a cast to avoid >> a warning when checking is enabled. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: None >> >> lib/efi_loader/efi_file.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c >> index 128cb0a627..8a4f3a9f40 100644 >> --- a/lib/efi_loader/efi_file.c >> +++ b/lib/efi_loader/efi_file.c >> @@ -221,8 +221,8 @@ static efi_status_t EFIAPI efi_file_open(struct efi_file_handle *file, >> struct file_handle *fh = to_fh(file); >> efi_status_t ret; >> >> - EFI_ENTRY("%p, %p, \"%ls\", %llx, %llu", file, new_handle, file_name, >> - open_mode, attributes); >> + EFI_ENTRY("%p, %p, \"%ls\", %llx, %llu", file, new_handle, >> + (wchar_t *)file_name, open_mode, attributes); > > Our utf-16 strings are all u16[]. > > Please, change file_name to be u16* both here and in include/efi_api.h. > Then check every caller. Thanks Simon for reporting. I have created a new patch efi_loader: use u16* for file name https://lists.denx.de/pipermail/u-boot/2019-January/354375.html Best regards Heinrich