Thanks for your comments I'll update the patch. -Shumin -----Original Message----- From: edk2-devel [mailto:[email protected]] On Behalf Of Ard Biesheuvel Sent: Thursday, September 17, 2015 4:56 PM To: Qiu, Shumin Cc: Carsey, Jaben; Ni, Ruiyu; [email protected]; Yang, Jadis Subject: Re: [edk2] [PATCH] ShellPkg: Fix GCC build fail.
On 17 September 2015 at 05:04, Qiu Shumin <[email protected]> wrote: > Cc: Jaben Carsey <[email protected]> > Cc: Ruiyu Ni <[email protected]> > Cc: Yang Jadis <[email protected]> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Qiu Shumin <[email protected]> > --- > ShellPkg/Application/Shell/ShellParametersProtocol.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ShellPkg/Application/Shell/ShellParametersProtocol.c > b/ShellPkg/Application/Shell/ShellParametersProtocol.c > index b404987..a152474 100644 > --- a/ShellPkg/Application/Shell/ShellParametersProtocol.c > +++ b/ShellPkg/Application/Shell/ShellParametersProtocol.c > @@ -206,7 +206,7 @@ ParseCommandLineToArgs( > return (EFI_SUCCESS); > } > > - TrimSpaces(&(CHAR16*)CommandLine); > + TrimSpaces((CHAR16**)(&CommandLine)); OK, I did not spot this patch before commenting on the original one. As I commented there, you are casting away constness to allow TrimSpaces() to modify an input argument that we promised not to touch. The only option is to make a copy of CommandLine and work with that in the remainder of the function. > Size = StrSize(CommandLine); > TempParameter = AllocateZeroPool(Size); > if (TempParameter == NULL) { > -- > 1.9.5.msysgit.1 > > _______________________________________________ > edk2-devel mailing list > [email protected] > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

