From 582510249f2fb1334e507b99421b9485f6b89159 Mon Sep 17 00:00:00 2001 From: xli24 Date: Thu, 25 Jan 2007 06:05:36 +0000 Subject: 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 --- MdePkg/Library/BaseLib/SwapBytes32.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'MdePkg/Library/BaseLib/SwapBytes32.c') diff --git a/MdePkg/Library/BaseLib/SwapBytes32.c b/MdePkg/Library/BaseLib/SwapBytes32.c index 4e683b09d1..09396dba4e 100644 --- a/MdePkg/Library/BaseLib/SwapBytes32.c +++ b/MdePkg/Library/BaseLib/SwapBytes32.c @@ -32,8 +32,11 @@ SwapBytes32 ( IN UINT32 Operand ) { - return (UINT32)( - ((UINT32)SwapBytes16 ((UINT16)Operand) << 16) | - ((UINT32)SwapBytes16 ((UINT16)(Operand >> 16))) - ); + UINT32 LowerBytes; + UINT32 HigherBytes; + + LowerBytes = (UINT32) SwapBytes16 ((UINT16) Operand); + HigherBytes = (UINT32) SwapBytes16 ((UINT16) (Operand >> 16)); + + return (LowerBytes << 16 | HigherBytes); } -- cgit v1.2.3