On 19.07.2023 13:38, Andrew Cooper wrote: > This is the remainder change to get x86 compiling with -Wwrite-strings. ARM > still has some cleanup to go. > > There are two swamps left. > > 1) efi_arch_handle_cmdline(). Swapping name.s for name.cs makes the code > compile, but only because the underlying union launders the pointer back > to being mutable.
To address (part of?) this concern, ... > --- a/xen/arch/x86/efi/efi-boot.h > +++ b/xen/arch/x86/efi/efi-boot.h > @@ -324,7 +324,7 @@ static void __init efi_arch_handle_cmdline(CHAR16 > *image_name, > w2s(&name); > } > else > - name.s = "xen"; > + name.cs = "xen"; > place_string(&mbi.cmdline, name.s); ... how about changing this function invocation to also pass name.cs? The function already takes const char *, it's just that there was no "cs" union member back at the time. Jan
