[edk2] [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Dandan Bi posted 1 patch 6 years, 2 months ago
Failed in applying to current master (apply log)
MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
1 file changed, 2 insertions(+)
[edk2] [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
Posted by Dandan Bi 6 years, 2 months ago
Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (
 {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
-- 
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] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
Posted by Zeng, Star 6 years, 2 months ago
Reviewed-by: Star Zeng <star.zeng@intel.com>

Cc Laszlo.

You can add similar comment like 1ea53108f6c1010a00a828d1d59ea28934025415 as recommended by https://bugzilla.tianocore.org/show_bug.cgi?id=607.

Thanks,
Star
-----Original Message-----
From: Bi, Dandan 
Sent: Wednesday, February 7, 2018 9:31 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (  {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
--
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] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
Posted by Bi, Dandan 6 years, 2 months ago
Thank you star. I will add comment before commit the patch. 


Regards,
Dandan
-----Original Message-----
From: Zeng, Star 
Sent: Wednesday, February 7, 2018 9:45 AM
To: Bi, Dandan <dandan.bi@intel.com>; edk2-devel@lists.01.org
Cc: Ni, Ruiyu <ruiyu.ni@intel.com>; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>; Zeng, Star <star.zeng@intel.com>
Subject: RE: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Reviewed-by: Star Zeng <star.zeng@intel.com>

Cc Laszlo.

You can add similar comment like 1ea53108f6c1010a00a828d1d59ea28934025415 as recommended by https://bugzilla.tianocore.org/show_bug.cgi?id=607.

Thanks,
Star
-----Original Message-----
From: Bi, Dandan 
Sent: Wednesday, February 7, 2018 9:31 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
Subject: [patch] MdeModulePkg/PciBusDxe: Fix VS2012 build failure

Initialize local variable to suppress warning C4703:
potentially uninitialized local pointer variable.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index c48e3bb..13221b9 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -242,10 +242,12 @@ PciBusDriverBindingStart (  {
   EFI_STATUS                      Status;
   EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
   EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
 
+  PciRootBridgeIo = NULL;
+
   //
   // Check RemainingDevicePath validation
   //
   if (RemainingDevicePath != NULL) {
     //
--
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] MdeModulePkg/PciBusDxe: Fix VS2012 build failure
Posted by Ni, Ruiyu 6 years, 2 months ago
On 2/7/2018 9:30 AM, Dandan Bi wrote:
> Initialize local variable to suppress warning C4703:
> potentially uninitialized local pointer variable.
> 
> Cc: Star Zeng <star.zeng@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> index c48e3bb..13221b9 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
> @@ -242,10 +242,12 @@ PciBusDriverBindingStart (
>   {
>     EFI_STATUS                      Status;
>     EFI_DEVICE_PATH_PROTOCOL        *ParentDevicePath;
>     EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo;
>   
> +  PciRootBridgeIo = NULL;
> +
>     //
>     // Check RemainingDevicePath validation
>     //
>     if (RemainingDevicePath != NULL) {
>       //
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

Thank you very much!!

-- 
Thanks,
Ray
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel