From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 44A8981F94 for ; Thu, 8 Dec 2016 17:18:14 -0800 (PST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP; 08 Dec 2016 17:18:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="795945587" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 08 Dec 2016 17:18:13 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 17:18:13 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 17:18:13 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.17]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.206]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 09:18:11 +0800 From: "Bi, Dandan" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after declaration Thread-Index: AQHSUbc6hZs1YiIFRU+kfbGCsbEHgqD+0IZA Date: Fri, 9 Dec 2016 01:18:10 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB39680EF5@SHSMSX103.ccr.corp.intel.com> References: <1481194467-75920-1-git-send-email-dandan.bi@intel.com> <1481194467-75920-3-git-send-email-dandan.bi@intel.com> <734D49CCEBEEF84792F5B80ED585239D58EAF9C6@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D58EAF9C6@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after declaration X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2016 01:18:14 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Got it ! I will submit a new patch. Thanks! Regards, Dandan -----Original Message----- From: Ni, Ruiyu=20 Sent: Friday, December 9, 2016 8:58 AM To: Bi, Dandan ; edk2-devel@lists.01.org Subject: RE: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after d= eclaration Dandan, Could you please create a global array mMonthDays? UINT8 mMonthDays[] =3D { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; Regards, Ray >-----Original Message----- >From: Bi, Dandan >Sent: Thursday, December 8, 2016 6:54 PM >To: edk2-devel@lists.01.org >Cc: Ni, Ruiyu >Subject: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after=20 >declaration > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Dandan Bi >--- > FatPkg/EnhancedFatDxe/Misc.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/FatPkg/EnhancedFatDxe/Misc.c=20 >b/FatPkg/EnhancedFatDxe/Misc.c index f91759c..6ad688c 100644 >--- a/FatPkg/EnhancedFatDxe/Misc.c >+++ b/FatPkg/EnhancedFatDxe/Misc.c >@@ -696,15 +696,27 @@ Returns: > TRUE - The time is valid. > FALSE - The time is not valid. > > --*/ > { >- static UINT8 MonthDays[] =3D { 31, 28, 31, 30, 31, 30, 31, 31, 30,=20 >31, 30, 31 }; >+ STATIC UINT8 MonthDays[12]; > UINTN Day; > BOOLEAN ValidTime; > > ValidTime =3D TRUE; >+ MonthDays[0] =3D 31; >+ MonthDays[1] =3D 28; >+ MonthDays[2] =3D 31; >+ MonthDays[3] =3D 30; >+ MonthDays[4] =3D 31; >+ MonthDays[5] =3D 30; >+ MonthDays[6] =3D 31; >+ MonthDays[7] =3D 31; >+ MonthDays[8] =3D 30; >+ MonthDays[9] =3D 31; >+ MonthDays[10] =3D 30; >+ MonthDays[11] =3D 31; > > // > // Check the fields for range problems > // Fat can only support from 1980 > // >-- >1.9.5.msysgit.1