]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix build failure by adding UINT16 type cast.
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Apr 2013 07:16:42 +0000 (07:16 +0000)
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Apr 2013 07:16:42 +0000 (07:16 +0000)
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14259 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/DevicePathDxe/DevicePathFromText.c

index c06188828003779dbf273c101518116a208885a6..f96bea14771f9e26091c89db4b57ff2921731698 100644 (file)
@@ -1683,7 +1683,7 @@ DevPathFromTextSAS (
     } else if (StrCmp (LocationStr, L"Internal") == 0) {\r
       Uint16 = 0;\r
     } else {\r
-      Uint16 = (Strtoi (LocationStr) & BIT0);\r
+      Uint16 = ((UINT16) Strtoi (LocationStr) & BIT0);\r
     }\r
     Info |= (Uint16 << 5);\r
 \r
@@ -1696,7 +1696,7 @@ DevPathFromTextSAS (
     } else if (StrCmp (ConnectStr, L"Direct") == 0) {\r
       Uint16 = 0;\r
     } else {\r
-      Uint16 = (Strtoi (ConnectStr) & (BIT0 | BIT1));\r
+      Uint16 = ((UINT16) Strtoi (ConnectStr) & (BIT0 | BIT1));\r
     }\r
     Info |= (Uint16 << 6);\r
 \r
@@ -1780,7 +1780,7 @@ DevPathFromTextSasEx (
     } else if (StrCmp (LocationStr, L"Internal") == 0) {\r
       Uint16 = 0;\r
     } else {\r
-      Uint16 = (Strtoi (LocationStr) & BIT0);\r
+      Uint16 = ((UINT16) Strtoi (LocationStr) & BIT0);\r
     }\r
     Info |= (Uint16 << 5);\r
 \r
@@ -1793,7 +1793,7 @@ DevPathFromTextSasEx (
     } else if (StrCmp (ConnectStr, L"Direct") == 0) {\r
       Uint16 = 0;\r
     } else {\r
-      Uint16 = (Strtoi (ConnectStr) & (BIT0 | BIT1));\r
+      Uint16 = ((UINT16) Strtoi (ConnectStr) & (BIT0 | BIT1));\r
     }\r
     Info |= (Uint16 << 6);\r
 \r