]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg add size cast to bit operations
authorJaben Carsey <jaben.carsey@intel.com>
Thu, 14 Aug 2014 17:58:16 +0000 (17:58 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 14 Aug 2014 17:58:16 +0000 (17:58 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15804 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellDebug1CommandsLib/Pci.c

index 1e0d8c28d4aec4562c7d9c5b698dc1aa327173ce..25c3dfef6c51e81dfc1b452fad0ccb029de7ef18 100644 (file)
@@ -1378,7 +1378,7 @@ PciGetClassStrings (
   Print strings that represent PCI device class, subclass and programmed I/F.\r
 \r
   @param[in] ClassCodePtr   Points to the memory which stores register Class Code in PCI\r
-                 configuation space.\r
+                            configuration space.\r
   @param[in] IncludePIF     If the printed string should include the programming I/F part\r
 **/\r
 VOID\r
@@ -1391,9 +1391,9 @@ PciPrintClassCode (
   PCI_CLASS_STRINGS ClassStrings;\r
 \r
   ClassCode = 0;\r
-  ClassCode |= ClassCodePtr[0];\r
-  ClassCode |= (ClassCodePtr[1] << 8);\r
-  ClassCode |= (ClassCodePtr[2] << 16);\r
+  ClassCode |= (UINT32)ClassCodePtr[0];\r
+  ClassCode |= (UINT32)(ClassCodePtr[1] << 8);\r
+  ClassCode |= (UINT32)(ClassCodePtr[2] << 16);\r
 \r
   //\r
   // Get name from class code\r