MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 2 ++ 1 file changed, 2 insertions(+)
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
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
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
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
© 2016 - 2024 Red Hat, Inc.