[edk2] [PATCH] NetworkPkg: Remove unused local variables
Fix gcc build errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud --- NetworkPkg/HttpDxe/HttpImpl.c | 3 +-- NetworkPkg/HttpDxe/HttpProto.c | 6 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 50c0617..588e1bb 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -2,6 +2,7 @@ Implementation of EFI_HTTP_PROTOCOL protocol interfaces. Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -227,7 +228,6 @@ EfiHttpRequest ( UINTN UrlLen; CHAR16*HostNameStr; HTTP_TOKEN_WRAP *Wrap; - HTTP_TCP_TOKEN_WRAP *TcpWrap; CHAR8 *FileUrl; if ((This == NULL) || (Token == NULL)) { @@ -278,7 +278,6 @@ EfiHttpRequest ( HostName= NULL; Wrap= NULL; HostNameStr = NULL; - TcpWrap = NULL; // // Parse the URI of the remote host. diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 13d5748..57ea207 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -307,10 +307,8 @@ HttpCreateTcp4TxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = &Wrap->TcpWrap; Status = gBS->CreateEvent ( @@ -383,10 +381,8 @@ HttpCreateTcp4RxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = &Wrap->TcpWrap; Status = gBS->CreateEvent ( @@ -672,10 +668,8 @@ HttpConfigureTcp4 ( EFI_TCP4_CONFIG_DATA *Tcp4CfgData; EFI_TCP4_ACCESS_POINT *Tcp4AP; EFI_TCP4_OPTION*Tcp4Option; - HTTP_TCP_TOKEN_WRAP*TcpWrap; ASSERT (HttpInstance != NULL); - TcpWrap = &Wrap->TcpWrap; Tcp4CfgData = &HttpInstance->Tcp4CfgData; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg: Remove unused local variables
Anyone for review please? -Original Message- From: El-Haj-Mahmoud, Samer Sent: Tuesday, September 29, 2015 6:02 PM To: edk2-devel@lists.01.org Cc: Siyuan Fu ; El-Haj-Mahmoud, Samer ; El-Haj-Mahmoud, Samer Subject: [PATCH] NetworkPkg: Remove unused local variables Fix gcc build errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud --- NetworkPkg/HttpDxe/HttpImpl.c | 3 +-- NetworkPkg/HttpDxe/HttpProto.c | 6 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 50c0617..588e1bb 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -2,6 +2,7 @@ Implementation of EFI_HTTP_PROTOCOL protocol interfaces. Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -227,7 +228,6 @@ EfiHttpRequest ( UINTN UrlLen; CHAR16*HostNameStr; HTTP_TOKEN_WRAP *Wrap; - HTTP_TCP_TOKEN_WRAP *TcpWrap; CHAR8 *FileUrl; if ((This == NULL) || (Token == NULL)) { @@ -278,7 +278,6 @@ EfiHttpRequest ( HostName= NULL; Wrap= NULL; HostNameStr = NULL; - TcpWrap = NULL; // // Parse the URI of the remote host. diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 13d5748..57ea207 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -307,10 +307,8 @@ HttpCreateTcp4TxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = &Wrap->TcpWrap; Status = gBS->CreateEvent ( @@ -383,10 +381,8 @@ HttpCreateTcp4RxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = &Wrap->TcpWrap; Status = gBS->CreateEvent ( @@ -672,10 +668,8 @@ HttpConfigureTcp4 ( EFI_TCP4_CONFIG_DATA *Tcp4CfgData; EFI_TCP4_ACCESS_POINT *Tcp4AP; EFI_TCP4_OPTION*Tcp4Option; - HTTP_TCP_TOKEN_WRAP*TcpWrap; ASSERT (HttpInstance != NULL); - TcpWrap = &Wrap->TcpWrap; Tcp4CfgData = &HttpInstance->Tcp4CfgData; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg: Remove unused local variables
On 10/06/15 17:38, El-Haj-Mahmoud, Samer wrote: > Anyone for review please? I reproduced the build failure with Linaro's cross compiler (I added the HTTP stack to ArmVirtQemu.dsc and cross-built it). Reviewed-by: Laszlo Ersek Build-tested-by: Laszlo Ersek Because the fix is simple, obviously correct, and remedies a build failure, I went ahead and committed it to SVN. Revision 18573. I touched up the commit message: I named HttpDxe in the subject, and named the exact gcc warning option that found the wart. Thanks Laszlo > > -Original Message- > From: El-Haj-Mahmoud, Samer > Sent: Tuesday, September 29, 2015 6:02 PM > To: edk2-devel@lists.01.org > Cc: Siyuan Fu ; El-Haj-Mahmoud, Samer > ; El-Haj-Mahmoud, Samer > > Subject: [PATCH] NetworkPkg: Remove unused local variables > > Fix gcc build errors > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Samer El-Haj-Mahmoud > --- > NetworkPkg/HttpDxe/HttpImpl.c | 3 +-- > NetworkPkg/HttpDxe/HttpProto.c | 6 -- > 2 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c > index 50c0617..588e1bb 100644 > --- a/NetworkPkg/HttpDxe/HttpImpl.c > +++ b/NetworkPkg/HttpDxe/HttpImpl.c > @@ -2,6 +2,7 @@ >Implementation of EFI_HTTP_PROTOCOL protocol interfaces. > >Copyright (c) 2015, Intel Corporation. All rights reserved. > + (C) Copyright 2015 Hewlett Packard Enterprise Development LP > >This program and the accompanying materials >are licensed and made available under the terms and conditions of the BSD > License @@ -227,7 +228,6 @@ EfiHttpRequest ( >UINTN UrlLen; >CHAR16*HostNameStr; >HTTP_TOKEN_WRAP *Wrap; > - HTTP_TCP_TOKEN_WRAP *TcpWrap; >CHAR8 *FileUrl; > >if ((This == NULL) || (Token == NULL)) { @@ -278,7 +278,6 @@ > EfiHttpRequest ( >HostName= NULL; >Wrap= NULL; >HostNameStr = NULL; > - TcpWrap = NULL; > >// >// Parse the URI of the remote host. > diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c > index 13d5748..57ea207 100644 > --- a/NetworkPkg/HttpDxe/HttpProto.c > +++ b/NetworkPkg/HttpDxe/HttpProto.c > @@ -307,10 +307,8 @@ HttpCreateTcp4TxEvent ( >) > { >EFI_STATUS Status; > - HTTP_PROTOCOL*HttpInstance; >HTTP_TCP_TOKEN_WRAP *TcpWrap; > > - HttpInstance = Wrap->HttpInstance; >TcpWrap = &Wrap->TcpWrap; > >Status = gBS->CreateEvent ( > @@ -383,10 +381,8 @@ HttpCreateTcp4RxEvent ( >) > { >EFI_STATUS Status; > - HTTP_PROTOCOL*HttpInstance; >HTTP_TCP_TOKEN_WRAP *TcpWrap; > > - HttpInstance = Wrap->HttpInstance; >TcpWrap = &Wrap->TcpWrap; > >Status = gBS->CreateEvent ( > @@ -672,10 +668,8 @@ HttpConfigureTcp4 ( >EFI_TCP4_CONFIG_DATA *Tcp4CfgData; >EFI_TCP4_ACCESS_POINT *Tcp4AP; >EFI_TCP4_OPTION*Tcp4Option; > - HTTP_TCP_TOKEN_WRAP*TcpWrap; > >ASSERT (HttpInstance != NULL); > - TcpWrap = &Wrap->TcpWrap; > > >Tcp4CfgData = &HttpInstance->Tcp4CfgData; > -- > 1.9.5.msysgit.1 > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg: Remove unused local variables
Thank you! -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Tuesday, October 06, 2015 2:53 PM To: El-Haj-Mahmoud, Samer ; edk2-devel@lists.01.org Cc: Siyuan Fu Subject: Re: [edk2] [PATCH] NetworkPkg: Remove unused local variables On 10/06/15 17:38, El-Haj-Mahmoud, Samer wrote: > Anyone for review please? I reproduced the build failure with Linaro's cross compiler (I added the HTTP stack to ArmVirtQemu.dsc and cross-built it). Reviewed-by: Laszlo Ersek Build-tested-by: Laszlo Ersek Because the fix is simple, obviously correct, and remedies a build failure, I went ahead and committed it to SVN. Revision 18573. I touched up the commit message: I named HttpDxe in the subject, and named the exact gcc warning option that found the wart. Thanks Laszlo > > -Original Message- > From: El-Haj-Mahmoud, Samer > Sent: Tuesday, September 29, 2015 6:02 PM > To: edk2-devel@lists.01.org > Cc: Siyuan Fu ; El-Haj-Mahmoud, Samer > ; El-Haj-Mahmoud, Samer > > Subject: [PATCH] NetworkPkg: Remove unused local variables > > Fix gcc build errors > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Samer El-Haj-Mahmoud > --- > NetworkPkg/HttpDxe/HttpImpl.c | 3 +-- > NetworkPkg/HttpDxe/HttpProto.c | 6 -- > 2 files changed, 1 insertion(+), 8 deletions(-) > > diff --git a/NetworkPkg/HttpDxe/HttpImpl.c > b/NetworkPkg/HttpDxe/HttpImpl.c index 50c0617..588e1bb 100644 > --- a/NetworkPkg/HttpDxe/HttpImpl.c > +++ b/NetworkPkg/HttpDxe/HttpImpl.c > @@ -2,6 +2,7 @@ >Implementation of EFI_HTTP_PROTOCOL protocol interfaces. > >Copyright (c) 2015, Intel Corporation. All rights reserved. > + (C) Copyright 2015 Hewlett Packard Enterprise Development LP > >This program and the accompanying materials >are licensed and made available under the terms and conditions of the BSD > License @@ -227,7 +228,6 @@ EfiHttpRequest ( >UINTN UrlLen; >CHAR16*HostNameStr; >HTTP_TOKEN_WRAP *Wrap; > - HTTP_TCP_TOKEN_WRAP *TcpWrap; >CHAR8 *FileUrl; > >if ((This == NULL) || (Token == NULL)) { @@ -278,7 +278,6 @@ > EfiHttpRequest ( >HostName= NULL; >Wrap= NULL; >HostNameStr = NULL; > - TcpWrap = NULL; > >// >// Parse the URI of the remote host. > diff --git a/NetworkPkg/HttpDxe/HttpProto.c > b/NetworkPkg/HttpDxe/HttpProto.c index 13d5748..57ea207 100644 > --- a/NetworkPkg/HttpDxe/HttpProto.c > +++ b/NetworkPkg/HttpDxe/HttpProto.c > @@ -307,10 +307,8 @@ HttpCreateTcp4TxEvent ( >) > { >EFI_STATUS Status; > - HTTP_PROTOCOL*HttpInstance; >HTTP_TCP_TOKEN_WRAP *TcpWrap; > > - HttpInstance = Wrap->HttpInstance; >TcpWrap = &Wrap->TcpWrap; > >Status = gBS->CreateEvent ( > @@ -383,10 +381,8 @@ HttpCreateTcp4RxEvent ( >) > { >EFI_STATUS Status; > - HTTP_PROTOCOL*HttpInstance; >HTTP_TCP_TOKEN_WRAP *TcpWrap; > > - HttpInstance = Wrap->HttpInstance; >TcpWrap = &Wrap->TcpWrap; > >Status = gBS->CreateEvent ( > @@ -672,10 +668,8 @@ HttpConfigureTcp4 ( >EFI_TCP4_CONFIG_DATA *Tcp4CfgData; >EFI_TCP4_ACCESS_POINT *Tcp4AP; >EFI_TCP4_OPTION*Tcp4Option; > - HTTP_TCP_TOKEN_WRAP*TcpWrap; > >ASSERT (HttpInstance != NULL); > - TcpWrap = &Wrap->TcpWrap; > > >Tcp4CfgData = &HttpInstance->Tcp4CfgData; > -- > 1.9.5.msysgit.1 > > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] NetworkPkg : Remove unused local variables to fix gcc build errors
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud --- NetworkPkg/HttpDxe/HttpProto.c | 4 1 file changed, 4 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 85f8401..7e959d5 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -562,13 +562,9 @@ HttpCloseTcpRxEvent ( ) { HTTP_PROTOCOL*HttpInstance; - EFI_TCP4_IO_TOKEN*Rx4Token; - EFI_TCP6_IO_TOKEN*Rx6Token; ASSERT (Wrap != NULL); HttpInstance = Wrap->HttpInstance; - Rx4Token = NULL; - Rx6Token = NULL; if (HttpInstance->LocalAddressIsIPv6) { if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) { -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel