summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 09:24:56 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 09:24:56 +0000
commit1f4cf7b1ba400fa6b4ee29f9367312ac977ffe2d (patch)
tree78e75e93cd0f20574971e9ef279eba761f73ebc0
parent593a8308cc95cfff7d23f2c5e5a2ab8b8712e823 (diff)
downloadedk2-platforms-1f4cf7b1ba400fa6b4ee29f9367312ac977ffe2d.tar.xz
Fixed one bug when runtime test. The root cause is that ICC compiler will convert one local array to one global array, and not converted from boot time to run time.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3775 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
index e9bd801baa..91e6b03f0b 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -1029,8 +1029,23 @@ Returns:
--*/
{
- UINT8 DayOfMonth[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- BOOLEAN Adjacent = FALSE;
+ UINT8 DayOfMonth[12];
+ BOOLEAN Adjacent;
+
+ DayOfMonth[0] = 31;
+ DayOfMonth[1] = 29;
+ DayOfMonth[2] = 31;
+ DayOfMonth[3] = 30;
+ DayOfMonth[4] = 31;
+ DayOfMonth[5] = 30;
+ DayOfMonth[6] = 31;
+ DayOfMonth[7] = 31;
+ DayOfMonth[8] = 30;
+ DayOfMonth[9] = 31;
+ DayOfMonth[10] = 30;
+ DayOfMonth[11] = 31;
+
+ Adjacent = FALSE;
if (From->Year == To->Year) {
if (From->Month == To->Month) {