ArmPlatformPkg/ArmPlatformGlobalVariableLib: Fixed incorrect type casting

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13121 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2012-03-26 10:41:50 +00:00
parent 6bc4e19fec
commit f15f91a22f
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ ArmPlatformGetGlobalVariable (
if (VariableSize == 4) { if (VariableSize == 4) {
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset)); *(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
} else if (VariableSize == 8) { } else if (VariableSize == 8) {
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset)); *(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
} else { } else {
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize); CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
} }

View File

@ -48,7 +48,7 @@ ArmPlatformGetGlobalVariable (
if (VariableSize == 4) { if (VariableSize == 4) {
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset)); *(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
} else if (VariableSize == 8) { } else if (VariableSize == 8) {
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset)); *(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
} else { } else {
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize); CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
} }

View File

@ -36,7 +36,7 @@ ArmPlatformGetGlobalVariable (
if (VariableSize == 4) { if (VariableSize == 4) {
*(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset)); *(UINT32*)Variable = ReadUnaligned32 ((CONST UINT32*)(GlobalVariableBase + VariableOffset));
} else if (VariableSize == 8) { } else if (VariableSize == 8) {
*(UINT32*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset)); *(UINT64*)Variable = ReadUnaligned64 ((CONST UINT64*)(GlobalVariableBase + VariableOffset));
} else { } else {
CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize); CopyMem (Variable, (VOID*)(GlobalVariableBase + VariableOffset), VariableSize);
} }