summaryrefslogtreecommitdiffstats
path: root/MdePkg/Library/BaseMemoryLib
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-25 06:05:36 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2007-01-25 06:05:36 +0000
commit582510249f2fb1334e507b99421b9485f6b89159 (patch)
treecd9d7414885d26e79565cd12ec241af93dc600f2 /MdePkg/Library/BaseMemoryLib
parentba3a1cb5bb97ffdea980f188fbd14b08200aeac6 (diff)
downloadedk2-582510249f2fb1334e507b99421b9485f6b89159.tar.gz
edk2-582510249f2fb1334e507b99421b9485f6b89159.tar.bz2
edk2-582510249f2fb1334e507b99421b9485f6b89159.zip
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/BaseMemoryLib')
-rw-r--r--MdePkg/Library/BaseMemoryLib/CopyMem.c2
-rw-r--r--MdePkg/Library/BaseMemoryLib/MemLibGuid.c17
-rw-r--r--MdePkg/Library/BaseMemoryLib/SetMem.c1
3 files changed, 14 insertions, 6 deletions
diff --git a/MdePkg/Library/BaseMemoryLib/CopyMem.c b/MdePkg/Library/BaseMemoryLib/CopyMem.c
index f2106acb18..632061a668 100644
--- a/MdePkg/Library/BaseMemoryLib/CopyMem.c
+++ b/MdePkg/Library/BaseMemoryLib/CopyMem.c
@@ -17,6 +17,8 @@
**/
+#include "MemLibInternals.h"
+
/**
Copy Length bytes from Source to Destination.
diff --git a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c b/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
index 6f50340bd7..36da5b7424 100644
--- a/MdePkg/Library/BaseMemoryLib/MemLibGuid.c
+++ b/MdePkg/Library/BaseMemoryLib/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);
}
/**
diff --git a/MdePkg/Library/BaseMemoryLib/SetMem.c b/MdePkg/Library/BaseMemoryLib/SetMem.c
index 07acc6fbfe..d051f2d63b 100644
--- a/MdePkg/Library/BaseMemoryLib/SetMem.c
+++ b/MdePkg/Library/BaseMemoryLib/SetMem.c
@@ -17,6 +17,7 @@
**/
+#include "MemLibInternals.h"
/**
Set Buffer to Value for Size bytes.