From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 7F84A2035A7B1 for ; Tue, 14 Nov 2017 04:28:38 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id r68so21050475wmr.1 for ; Tue, 14 Nov 2017 04:32:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=eSONhRX5BSro3KSc0SDTb3JQ2TzOgp6irA8oHLzno1I=; b=uIR+Tr3aPYceJGGpuezU0SyIOS+fG1Lr3NQEsOk2Aax9s3MqTRcZvSZgAbnebAXpxs CoOFovlVye+o9I96KKi1Kr44JU2Nml1Y9shSfycGdYjpQVTb5SodggFZmAwj5OCt3Hv+ x40CVcykXThGZe46i2OyejVmTrxNg3Pvz8uQdeSrNoTQzzWgyS790wBcMEj9XwjwYOgL QygJoK3X0wZTdBApoOvsIbb9wxJOX1Wv9mrLSEdzFsCtB/KAjDmaxm/WuLa/rkS1RXfI y1p5FZFgaedlWKPPdbEB/OoOcpQdNX+MkicMlmyz9eJUAqyvruOZNvBEwu1M+PdFDn9j 50vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=eSONhRX5BSro3KSc0SDTb3JQ2TzOgp6irA8oHLzno1I=; b=H+OqsuHyguo4VQdTXNHVG3diDz25WM2KK0isOEE/bUM5ePD/V0rIP9cikujpQ35tay upu0OqLFK7rrQr2OjD4aBSIUggyApypOyNXaGrwvtjjFTEo3qZoLG0GwUIpmWegK6HfA xxvoBpFx23KKYVQAYG9U66bXC6zdZ7kKdDrHpijvnq2pwCHjEWxuCUKquCCiUb97leRz pAj6nRh/9HmFMx88XLP/8pEmqPquoJyDJ3qXSQn0HxR0VyQH3FQV6imNmDrRnGnRtA6q AOq84rtWek+nv2+wEfUeTsOVB9VzhwFU1tgZK6r+t4k5/A6Z4hDBkofiL0PIZsuzZpJX W5rg== X-Gm-Message-State: AJaThX6l1v4mBmi3JvmPDmNVhduxAjLGMwNZ4NyLOrOTCKF0hq1jkUP+ AbTR2Ox4tp5myvBS+LVxQH2/ISQnjA8= X-Google-Smtp-Source: AGs4zMZ6Ac+ENFuc0DQfsujTV3smrCSulW57sefVVZWnAobBSrXwIY4354CbDQ0FtufMwgWS/hNyJw== X-Received: by 10.80.209.193 with SMTP id i1mr128664edg.107.1510662764078; Tue, 14 Nov 2017 04:32:44 -0800 (PST) Received: from localhost.localdomain ([84.203.87.147]) by smtp.gmail.com with ESMTPSA id i17sm14574556ede.64.2017.11.14.04.32.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Nov 2017 04:32:43 -0800 (PST) From: Pete Batard To: edk2-devel@lists.01.org Date: Tue, 14 Nov 2017 12:32:26 +0000 Message-Id: <20171114123229.3516-2-pete@akeo.ie> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20171114123229.3516-1-pete@akeo.ie> References: <20171114123229.3516-1-pete@akeo.ie> Subject: [PATCH 1/4] MdeModulePkg, NetworkPkg: Fix VS2017 IA32 warnings X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2017 12:28:38 -0000 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 --- 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