From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.zytor.com (terminus.zytor.com [65.50.211.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3B37A20945C16 for ; Thu, 14 Sep 2017 07:24:21 -0700 (PDT) Received: from [10.26.0.110] (corporativo.static.gvt.net.br [177.135.97.54] (may be forged)) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id v8EEP5ih032479 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 14 Sep 2017 07:25:07 -0700 To: Star Zeng , edk2-devel@lists.01.org Cc: Laszlo Ersek , Eric Dong , Ruiyu Ni , Liming Gao , Dandan Bi References: <1505386427-9048-1-git-send-email-star.zeng@intel.com> From: Paulo Alcantara Message-ID: <305d96b4-f4b7-2c1d-d6d6-8674d426d08b@zytor.com> Date: Thu, 14 Sep 2017 11:25:00 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1505386427-9048-1-git-send-email-star.zeng@intel.com> Subject: Re: [PATCH] MdeModulePkg UdfDxe: Fix VS2010/VS2012 build failure 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: Thu, 14 Sep 2017 14:24:21 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi, On 9/14/2017 7:53 AM, Star Zeng wrote: > VS2010/VS2012 build failure with below info: > warning C4701: > potentially uninitialized local variable 'DataOffset' used > potentially uninitialized local variable 'FilePosition' used > potentially uninitialized local variable 'FinishedSeeking' used > potentially uninitialized local variable 'Data' used > warning C4703: > potentially uninitialized local pointer variable 'Data' used > > In fact, DataOffset, FilePosition and FinishedSeeking are initialized > and then used if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ). > DoFreeAed will be set to TRUE when Data is allocated and returned from > GetAedAdsData(), and Data will be freed if (DoFreeAed) when exiting. > > Use same method at 5afa5b815936e2b45a375b6521764195bed68680 to fix > the build failure. > > There is related discussion at > https://lists.01.org/pipermail/edk2-devel/2017-September/014641.html > > Cc: Laszlo Ersek > Cc: Eric Dong > Cc: Paulo Alcantara > Cc: Ruiyu Ni > Cc: Liming Gao > Cc: Dandan Bi > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c | 4 ++++ > 1 file changed, 4 insertions(+) With your patch, NT32 X64 build passes with VS2012. Thanks! Reviewed-by: Paulo Alcantara Paulo