diff options
author | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-16 04:51:25 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-09-16 04:51:25 +0000 |
commit | cd7bfc2c632841fab110f601a32850eeddc16af1 (patch) | |
tree | 4d1f82523dd545fa241053cf52b31b8c2b915fe7 /MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | |
parent | 7bee5a761f4cbafd1e1805dfd99255a0353bbf88 (diff) | |
download | edk2-cd7bfc2c632841fab110f601a32850eeddc16af1.zip edk2-cd7bfc2c632841fab110f601a32850eeddc16af1.tar.gz edk2-cd7bfc2c632841fab110f601a32850eeddc16af1.tar.bz2 |
Refine code to make code run safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10880 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index b124b72..4923478 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -1499,7 +1499,7 @@ ParseOpCodes ( CurrentStatement->Minimum = ((EFI_IFR_NUMERIC *) OpCodeData)->data.u8.MinValue;
CurrentStatement->Maximum = ((EFI_IFR_NUMERIC *) OpCodeData)->data.u8.MaxValue;
CurrentStatement->Step = ((EFI_IFR_NUMERIC *) OpCodeData)->data.u8.Step;
- CurrentStatement->StorageWidth = sizeof (UINT8);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (UINT8);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_8;
break;
@@ -1507,7 +1507,7 @@ ParseOpCodes ( CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MinValue, sizeof (UINT16));
CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.MaxValue, sizeof (UINT16));
CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u16.Step, sizeof (UINT16));
- CurrentStatement->StorageWidth = sizeof (UINT16);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (UINT16);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_16;
break;
@@ -1515,7 +1515,7 @@ ParseOpCodes ( CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MinValue, sizeof (UINT32));
CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.MaxValue, sizeof (UINT32));
CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u32.Step, sizeof (UINT32));
- CurrentStatement->StorageWidth = sizeof (UINT32);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (UINT32);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_32;
break;
@@ -1523,7 +1523,7 @@ ParseOpCodes ( CopyMem (&CurrentStatement->Minimum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MinValue, sizeof (UINT64));
CopyMem (&CurrentStatement->Maximum, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.MaxValue, sizeof (UINT64));
CopyMem (&CurrentStatement->Step, &((EFI_IFR_NUMERIC *) OpCodeData)->data.u64.Step, sizeof (UINT64));
- CurrentStatement->StorageWidth = sizeof (UINT64);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (UINT64);
Value->Type = EFI_IFR_TYPE_NUM_SIZE_64;
break;
@@ -1558,7 +1558,7 @@ ParseOpCodes ( ASSERT(CurrentStatement != NULL);
CurrentStatement->Flags = ((EFI_IFR_CHECKBOX *) OpCodeData)->Flags;
- CurrentStatement->StorageWidth = sizeof (BOOLEAN);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (BOOLEAN);
CurrentStatement->HiiValue.Type = EFI_IFR_TYPE_BOOLEAN;
InitializeRequestElement (FormSet, CurrentStatement);
@@ -1610,7 +1610,7 @@ ParseOpCodes ( CurrentStatement->HiiValue.Type = EFI_IFR_TYPE_DATE;
if ((CurrentStatement->Flags & EFI_QF_DATE_STORAGE) == QF_DATE_STORAGE_NORMAL) {
- CurrentStatement->StorageWidth = sizeof (EFI_HII_DATE);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_DATE);
InitializeRequestElement (FormSet, CurrentStatement);
} else {
@@ -1630,7 +1630,7 @@ ParseOpCodes ( CurrentStatement->HiiValue.Type = EFI_IFR_TYPE_TIME;
if ((CurrentStatement->Flags & QF_TIME_STORAGE) == QF_TIME_STORAGE_NORMAL) {
- CurrentStatement->StorageWidth = sizeof (EFI_IFR_TIME);
+ CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_IFR_TIME);
InitializeRequestElement (FormSet, CurrentStatement);
} else {
|