Message ID | 1429793525-28290-2-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show |
On 29 April 2015 at 16:08, Zhang, Chao B <chao.b.zhang@intel.com> wrote: > Laszlo: > Can you provide more info about the environment on which build failure exposes. > When do you plan to check in this patch? > Hi Chao, Let me reply to that since I am the author of the patch. When building with optimization enabled using GCC, the compiler notices that these variables are only assigned and never referred to after that. Since the default GCC configuration specifies -Werror, this causes the compiler to reject these files. Regards, Ard. > -----Original Message----- > From: Zhang, Chao B > Sent: Tuesday, April 28, 2015 10:37 AM > To: 'edk2-devel@lists.sourceforge.net' > Cc: 'lersek@redhat.com' > Subject: RE: [edk2] [PATCH 1/3] SecurityPkg: remove unused variables > > Laszlo: > > It looks good to me. > > Reviewed-by: Chao Zhang <chao.b.zhang@intel.com> > > > > > > Thanks & Best regards > Chao Zhang > > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Monday, April 27, 2015 7:08 PM > To: edk2-devel@lists.sourceforge.net > Cc: Zhang, Chao B > Subject: Re: [edk2] [PATCH 1/3] SecurityPkg: remove unused variables > > On 04/23/15 14:52, Ard Biesheuvel wrote: >> This removes various unused variables from SecurityPkg whose presence >> is causing failed builds. >> >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> >> --- >> SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c | 5 ----- >> >> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfig >> FileExplorer.c | 2 -- >> 2 files changed, 7 deletions(-) > > Cc: Chao Zhang <chao.b.zhang@intel.com> (see Maintainers.txt) > > Thanks > Laszlo > >> diff --git >> a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c >> b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c >> index 1e9e1907c004..b48129135fd3 100644 >> --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c >> +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c >> @@ -1255,7 +1255,6 @@ IsDeleteAuthVariable ( >> ) >> { >> BOOLEAN Del; >> - UINT8 *Payload; >> UINTN PayloadSize; >> >> Del = FALSE; >> @@ -1270,13 +1269,11 @@ IsDeleteAuthVariable ( >> (Attributes == Variable->CurrPtr->Attributes) && >> ((Attributes & (EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)) != 0)) { >> if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) { >> - Payload = (UINT8 *) Data + AUTHINFO2_SIZE (Data); >> PayloadSize = DataSize - AUTHINFO2_SIZE (Data); >> if (PayloadSize == 0) { >> Del = TRUE; >> } >> } else { >> - Payload = (UINT8 *) Data + AUTHINFO_SIZE; >> PayloadSize = DataSize - AUTHINFO_SIZE; >> if (PayloadSize == 0) { >> Del = TRUE; >> @@ -2179,7 +2176,6 @@ VerifyTimeBasedPayload ( >> UINT8 *Buffer; >> UINTN Length; >> UINT8 *SignerCerts; >> - UINT8 *WrapSigData; >> UINTN CertStackSize; >> UINT8 *CertsInCertDb; >> UINT32 CertsSizeinDb; >> @@ -2188,7 +2184,6 @@ VerifyTimeBasedPayload ( >> CertData = NULL; >> NewData = NULL; >> Attr = Attributes; >> - WrapSigData = NULL; >> SignerCerts = NULL; >> RootCert = NULL; >> CertsInCertDb = NULL; >> diff --git >> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConf >> igFileExplorer.c >> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConf >> igFileExplorer.c index b731865ed774..5ca013c92df2 100644 >> --- >> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConf >> igFileExplorer.c >> +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBoot >> +++ ConfigFileExplorer.c >> @@ -652,7 +652,6 @@ FindFileSystem ( >> { >> UINTN NoBlkIoHandles; >> UINTN NoSimpleFsHandles; >> - UINTN NoLoadFileHandles; >> EFI_HANDLE *BlkIoHandle; >> EFI_HANDLE *SimpleFsHandle; >> UINT16 *VolumeLabel; >> @@ -669,7 +668,6 @@ FindFileSystem ( >> >> >> NoSimpleFsHandles = 0; >> - NoLoadFileHandles = 0; >> OptionNumber = 0; >> InitializeListHead (&FsOptionMenu.Head); >> >> > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
diff --git a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c index 1e9e1907c004..b48129135fd3 100644 --- a/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c +++ b/SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c @@ -1255,7 +1255,6 @@ IsDeleteAuthVariable ( ) { BOOLEAN Del; - UINT8 *Payload; UINTN PayloadSize; Del = FALSE; @@ -1270,13 +1269,11 @@ IsDeleteAuthVariable ( (Attributes == Variable->CurrPtr->Attributes) && ((Attributes & (EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS)) != 0)) { if ((Attributes & EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS) != 0) { - Payload = (UINT8 *) Data + AUTHINFO2_SIZE (Data); PayloadSize = DataSize - AUTHINFO2_SIZE (Data); if (PayloadSize == 0) { Del = TRUE; } } else { - Payload = (UINT8 *) Data + AUTHINFO_SIZE; PayloadSize = DataSize - AUTHINFO_SIZE; if (PayloadSize == 0) { Del = TRUE; @@ -2179,7 +2176,6 @@ VerifyTimeBasedPayload ( UINT8 *Buffer; UINTN Length; UINT8 *SignerCerts; - UINT8 *WrapSigData; UINTN CertStackSize; UINT8 *CertsInCertDb; UINT32 CertsSizeinDb; @@ -2188,7 +2184,6 @@ VerifyTimeBasedPayload ( CertData = NULL; NewData = NULL; Attr = Attributes; - WrapSigData = NULL; SignerCerts = NULL; RootCert = NULL; CertsInCertDb = NULL; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c index b731865ed774..5ca013c92df2 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c @@ -652,7 +652,6 @@ FindFileSystem ( { UINTN NoBlkIoHandles; UINTN NoSimpleFsHandles; - UINTN NoLoadFileHandles; EFI_HANDLE *BlkIoHandle; EFI_HANDLE *SimpleFsHandle; UINT16 *VolumeLabel; @@ -669,7 +668,6 @@ FindFileSystem ( NoSimpleFsHandles = 0; - NoLoadFileHandles = 0; OptionNumber = 0; InitializeListHead (&FsOptionMenu.Head);
This removes various unused variables from SecurityPkg whose presence is causing failed builds. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- SecurityPkg/VariableAuthenticated/RuntimeDxe/AuthService.c | 5 ----- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigFileExplorer.c | 2 -- 2 files changed, 7 deletions(-)