diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-25 06:05:36 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-25 06:05:36 +0000 |
commit | 582510249f2fb1334e507b99421b9485f6b89159 (patch) | |
tree | cd9d7414885d26e79565cd12ec241af93dc600f2 /MdePkg/Library/PeiMemoryLib | |
parent | ba3a1cb5bb97ffdea980f188fbd14b08200aeac6 (diff) | |
download | edk2-platforms-582510249f2fb1334e507b99421b9485f6b89159.tar.xz |
Make MDE package pass intel IPF compiler with /W4 /WX switched on.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2312 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiMemoryLib')
-rw-r--r-- | MdePkg/Library/PeiMemoryLib/MemLib.c | 2 | ||||
-rw-r--r-- | MdePkg/Library/PeiMemoryLib/MemLibGuid.c | 17 |
2 files changed, 13 insertions, 6 deletions
diff --git a/MdePkg/Library/PeiMemoryLib/MemLib.c b/MdePkg/Library/PeiMemoryLib/MemLib.c index 3a27ab2e83..6f81e21c24 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLib.c +++ b/MdePkg/Library/PeiMemoryLib/MemLib.c @@ -14,6 +14,8 @@ **/
+#include "MemLibInternals.h"
+
VOID *
EFIAPI
InternalMemCopyMem (
diff --git a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c index 6f50340bd7..36da5b7424 100644 --- a/MdePkg/Library/PeiMemoryLib/MemLibGuid.c +++ b/MdePkg/Library/PeiMemoryLib/MemLibGuid.c @@ -77,12 +77,17 @@ CompareGuid ( IN CONST GUID *Guid2
)
{
- return (BOOLEAN)(
- ReadUnaligned64 ((CONST UINT64*)Guid1)
- == ReadUnaligned64 ((CONST UINT64*)Guid2) &&
- ReadUnaligned64 ((CONST UINT64*)Guid1 + 1)
- == ReadUnaligned64 ((CONST UINT64*)Guid2 + 1)
- );
+ UINT64 LowPartOfGuid1;
+ UINT64 LowPartOfGuid2;
+ UINT64 HighPartOfGuid1;
+ UINT64 HighPartOfGuid2;
+
+ LowPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1);
+ LowPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2);
+ HighPartOfGuid1 = ReadUnaligned64 ((CONST UINT64*) Guid1 + 1);
+ HighPartOfGuid2 = ReadUnaligned64 ((CONST UINT64*) Guid2 + 1);
+
+ return (BOOLEAN) (LowPartOfGuid1 == LowPartOfGuid2 && HighPartOfGuid1 == HighPartOfGuid2);
}
/**
|