]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/SwapBytes32.c
Make MDE package pass intel IPF compiler with /W4 /WX switched on.
[mirror_edk2.git] / MdePkg / Library / BaseLib / SwapBytes32.c
index 4e683b09d18d397619d67ef02caecc572480cb15..09396dba4e25599904830d1cac953c3b82711bb0 100644 (file)
@@ -32,8 +32,11 @@ SwapBytes32 (
   IN      UINT32                    Operand\r
   )\r
 {\r
-  return (UINT32)(\r
-           ((UINT32)SwapBytes16 ((UINT16)Operand) << 16) |\r
-           ((UINT32)SwapBytes16 ((UINT16)(Operand >> 16)))\r
-           );\r
+  UINT32  LowerBytes;\r
+  UINT32  HigherBytes;\r
+\r
+  LowerBytes  = (UINT32) SwapBytes16 ((UINT16) Operand);\r
+  HigherBytes = (UINT32) SwapBytes16 ((UINT16) (Operand >> 16));\r
+\r
+  return (LowerBytes << 16 | HigherBytes);\r
 }\r