public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Pete Batard <pete@akeo.ie>
To: edk2-devel@lists.01.org
Subject: [PATCH 1/4] MdeModulePkg, NetworkPkg: Fix VS2017 IA32 warnings
Date: Tue, 14 Nov 2017 12:32:26 +0000	[thread overview]
Message-ID: <20171114123229.3516-2-pete@akeo.ie> (raw)
In-Reply-To: <20171114123229.3516-1-pete@akeo.ie>

This is a preliminary patch before the introduction of VS2017 support.
Without this, IA32 compilation will produce the following warnings:
* warning C4701: potentially uninitialized local variable used
* warning C4703: potentially uninitialized local pointer variable used

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Pete Batard <pete@akeo.ie>
---
 MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c                                | 2 +-
 MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c | 2 +-
 MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c                                        | 2 +-
 MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c                                              | 2 +-
 NetworkPkg/HttpBootDxe/HttpBootImpl.c                                                        | 2 +-
 NetworkPkg/HttpBootDxe/HttpBootSupport.c                                                     | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
index 17fc3db507d0..fdab07f9738c 100644
--- a/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
+++ b/MdeModulePkg/Application/UiApp/FrontPageCustomizedUiSupport.c
@@ -512,7 +512,7 @@ RequiredDriver (
   EFI_STATUS                  Status;
   UINT8                       ClassGuidNum;
   EFI_GUID                    *ClassGuid;
-  EFI_IFR_FORM_SET            *Buffer;
+  EFI_IFR_FORM_SET            *Buffer = NULL;
   UINTN                       BufferSize;
   UINT8                       *Ptr;
   UINTN                       TempSize;
diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
index 6dd4fce13938..4ddfb0926dc2 100644
--- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
+++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerCustomizedUiSupport.c
@@ -308,7 +308,7 @@ IsRequiredDriver (
   EFI_STATUS                  Status;
   UINT8                       ClassGuidNum;
   EFI_GUID                    *ClassGuid;
-  EFI_IFR_FORM_SET            *Buffer;
+  EFI_IFR_FORM_SET            *Buffer = NULL;
   UINTN                       BufferSize;
   UINT8                       *Ptr;
   UINTN                       TempSize;
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
index 646864f4dfc1..9e92ff5874b7 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
@@ -5307,7 +5307,7 @@ HiiConfigRoutingRouteConfig (
   EFI_STRING                          ConfigResp;
   UINTN                               Length;
   EFI_STATUS                          Status;
-  EFI_DEVICE_PATH_PROTOCOL            *DevicePath;
+  EFI_DEVICE_PATH_PROTOCOL            *DevicePath = NULL;
   EFI_DEVICE_PATH_PROTOCOL            *TempDevicePath;
   LIST_ENTRY                          *Link;
   HII_DATABASE_RECORD                 *Database;
diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
index 31c2e3e5b849..04adae62572b 100644
--- a/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
+++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpMain.c
@@ -520,7 +520,7 @@ MnpTransmit (
   EFI_STATUS        Status;
   MNP_INSTANCE_DATA *Instance;
   MNP_SERVICE_DATA  *MnpServiceData;
-  UINT8             *PktBuf;
+  UINT8             *PktBuf = NULL;
   UINT32            PktLen;
   EFI_TPL           OldTpl;
 
diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
index 06a8a6a38615..2687696b0de1 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c
@@ -121,7 +121,7 @@ HttpBootStart (
 {
   UINTN                Index;
   EFI_STATUS           Status;
-  CHAR8                *Uri;
+  CHAR8                *Uri = NULL;
   
 
   if (Private == NULL || FilePath == NULL) {
diff --git a/NetworkPkg/HttpBootDxe/HttpBootSupport.c b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
index d508e2c1a979..787dd24e3c71 100644
--- a/NetworkPkg/HttpBootDxe/HttpBootSupport.c
+++ b/NetworkPkg/HttpBootDxe/HttpBootSupport.c
@@ -1199,7 +1199,7 @@ HttpBootCheckImageType (
 {
   EFI_STATUS            Status;
   EFI_HTTP_HEADER       *Header;
-  CHAR8                 *FilePath;
+  CHAR8                 *FilePath = NULL;
   CHAR8                 *FilePost;
 
   if (Uri == NULL || UriParser == NULL || ImageType == NULL) {
-- 
2.14.2



  reply	other threads:[~2017-11-14 12:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 12:32 [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Pete Batard
2017-11-14 12:32 ` Pete Batard [this message]
2017-11-14 12:32 ` [PATCH 2/4] BaseTools: Add VS2017 IA32 and X64 support Pete Batard
2017-11-14 12:32 ` [PATCH 3/4] BaseTools: Add VS2017 ARM support Pete Batard
2017-11-14 12:32 ` [PATCH 4/4] BaseTools: Add VS2017 AARCH64 support Pete Batard
2017-11-14 16:03 ` [PATCH 0/4] BaseTools: Add VS2017 support, including ARM and AARCH64 Gao, Liming
2017-11-14 17:07   ` Pete Batard
2017-11-14 16:16 ` Kurt Kennett
2017-11-14 17:30   ` Pete Batard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171114123229.3516-2-pete@akeo.ie \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox