]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c
1) Add type cast for better coding style.
[mirror_edk2.git] / MdeModulePkg / Library / DxePrintLibPrint2Protocol / PrintLib.c
index c0750ad1767bb7559b3e4d2d1d757bc6beae35aa..caff0409993091f36ac46c80dea10f711aa30225 100644 (file)
@@ -6,7 +6,7 @@
   protocol related to this implementation, not in the public spec. So, this \r
   library instance is only for this code base.\r
 \r
-Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -1235,7 +1235,7 @@ InternalPrintLibSPrintMarker (
     //\r
     // Clear all the flag bits except those that may have been passed in\r
     //\r
-    Flags &= (OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT);\r
+    Flags &= (UINTN)(OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT);\r
 \r
     //\r
     // Set the default width to zero, and the default precision to 1\r
@@ -1343,7 +1343,7 @@ InternalPrintLibSPrintMarker (
         //\r
         // Flag space, +, 0, L & l are invalid for type p.\r
         //\r
-        Flags &= ~(PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE);\r
+        Flags &= ~(UINTN)(PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE);\r
         if (sizeof (VOID *) > 4) {\r
           Flags |= LONG_TYPE;\r
         }\r
@@ -1391,7 +1391,7 @@ InternalPrintLibSPrintMarker (
         if ((Flags & RADIX_HEX) == 0) {\r
           Radix = 10;\r
           if (Comma) {\r
-            Flags &= (~PREFIX_ZERO);\r
+            Flags &= (~(UINTN)PREFIX_ZERO);\r
             Precision = 1;\r
           }\r
           if (Value < 0) {\r
@@ -1460,7 +1460,7 @@ InternalPrintLibSPrintMarker (
           ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *);\r
         }\r
         if (ArgumentString == NULL) {\r
-          Flags &= (~ARGUMENT_UNICODE);\r
+          Flags &= (~(UINTN)ARGUMENT_UNICODE);\r
           ArgumentString = "<null string>";\r
         }\r
         //\r