From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 62A1B81F6C for ; Thu, 8 Dec 2016 16:57:43 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 08 Dec 2016 16:57:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,322,1477983600"; d="scan'208";a="1096689524" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga002.fm.intel.com with ESMTP; 08 Dec 2016 16:57:42 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 16:57:42 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 8 Dec 2016 16:57:36 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.11]) by shsmsx102.ccr.corp.intel.com ([169.254.2.37]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 08:57:33 +0800 From: "Ni, Ruiyu" To: "Bi, Dandan" , "edk2-devel@lists.01.org" Thread-Topic: [patch 2/8] FatPkg\EnhancedFatDxe: Initialize variable after declaration Thread-Index: AQHSUUGAuut2pdgT00KkF46A31vJMqD+y1rg Date: Fri, 9 Dec 2016 00:57:33 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58EAF9C6@SHSMSX104.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> In-Reply-To: <1481194467-75920-3-git-send-email-dandan.bi@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGNiNDgwMmQtNjFlMC00MWIxLTgyZmItMWZjZjg4YTc5ZWMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImljZkZxVDZCTWM5a09iZ3k4RThRMmN1WkZtVExjemFqUno1bXlrcU9xZlk9In0= x-ctpclassification: CTP_IC 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 00:57:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 decl= aration > >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 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, 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