From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 2E35181F7E for ; Thu, 8 Dec 2016 02:54:48 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 08 Dec 2016 02:54:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,318,1477983600"; d="scan'208";a="1079170610" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga001.fm.intel.com with ESMTP; 08 Dec 2016 02:54:47 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Ruiyu Ni Date: Thu, 8 Dec 2016 18:54:21 +0800 Message-Id: <1481194467-75920-3-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1481194467-75920-1-git-send-email-dandan.bi@intel.com> References: <1481194467-75920-1-git-send-email-dandan.bi@intel.com> Subject: [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: Thu, 08 Dec 2016 10:54:48 -0000 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[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + STATIC UINT8 MonthDays[12]; UINTN Day; BOOLEAN ValidTime; ValidTime = TRUE; + MonthDays[0] = 31; + MonthDays[1] = 28; + MonthDays[2] = 31; + MonthDays[3] = 30; + MonthDays[4] = 31; + MonthDays[5] = 30; + MonthDays[6] = 31; + MonthDays[7] = 31; + MonthDays[8] = 30; + MonthDays[9] = 31; + MonthDays[10] = 30; + MonthDays[11] = 31; // // Check the fields for range problems // Fat can only support from 1980 // -- 1.9.5.msysgit.1