[PATCH v2 4/5] efi: Use 16-bit unicode strings
Tom Rini
trini at konsulko.com
Mon Jul 19 03:01:44 CEST 2021
On Mon, Jul 19, 2021 at 02:41:46AM +0200, Heinrich Schuchardt wrote:
> On 7/18/21 10:14 PM, Simon Glass wrote:
> > At present we use wide characters for unicode but this is not necessary.
> > Change the code to use the 'u' literal instead. This helps to fix build
> > warnings for sandbox on rpi.
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > Suggested-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>
> According to https://en.cppreference.com/w/c/language/string_literal u""
> literals are supported since C11. In our Makefile we have CSTD_FLAG :=
> -std=gnu11.
>
> Once we have changed all u"" to L"" we can remove -fshort-wchar from our
> Makefiles.
[snip]
> > diff --git a/include/efi_loader.h b/include/efi_loader.h
> > index b81180cfda8..cad7961942b 100644
> > --- a/include/efi_loader.h
> > +++ b/include/efi_loader.h
> > @@ -924,7 +924,7 @@ efi_status_t efi_capsule_authenticate(const void *capsule,
> > efi_uintn_t capsule_size,
> > void **image, efi_uintn_t *image_size);
> >
> > -#define EFI_CAPSULE_DIR L"\\EFI\\UpdateCapsule\\"
> > +#define EFI_CAPSULE_DIR u"\\EFI\\UpdateCapsule\\"
This brings us more, not less, instances of u"" rather than L"". Should
we perhaps make a coccinelle "spatch" to update everything globally and
drop -fshort-wchar ?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210718/50c0dbb4/attachment.sig>
More information about the U-Boot
mailing list