Add type cast for better coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15769 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Qiu Shumin 2014-08-07 08:32:54 +00:00 committed by shenshushi
parent 0e24145420
commit e935092fa7
2 changed files with 6 additions and 6 deletions

View File

@ -142,7 +142,7 @@ WriteBackInvalidateDataCacheRange (
// Calculate the cache line alignment // Calculate the cache line alignment
// //
End = (Start + Length + (CACHE_LINE_SIZE - 1)) & ~(CACHE_LINE_SIZE - 1); End = (Start + Length + (CACHE_LINE_SIZE - 1)) & ~(CACHE_LINE_SIZE - 1);
Start &= ~(CACHE_LINE_SIZE - 1); Start &= ~((UINTN) CACHE_LINE_SIZE - 1);
do { do {
Start = (UINTN)AsmFlushCacheLine ((VOID*)Start) + CACHE_LINE_SIZE; Start = (UINTN)AsmFlushCacheLine ((VOID*)Start) + CACHE_LINE_SIZE;

View File

@ -213,7 +213,7 @@ BasePrintLibConvertValueToString (
// Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored. // Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored.
// //
if (Width == 0 || (Flags & COMMA_TYPE) != 0) { if (Width == 0 || (Flags & COMMA_TYPE) != 0) {
Flags &= (~PREFIX_ZERO); Flags &= ~((UINTN) PREFIX_ZERO);
} }
// //
// If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. // If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
@ -422,7 +422,7 @@ BasePrintLibSPrintMarker (
// //
// Clear all the flag bits except those that may have been passed in // Clear all the flag bits except those that may have been passed in
// //
Flags &= (OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT); Flags &= (UINTN) (OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT);
// //
// Set the default width to zero, and the default precision to 1 // Set the default width to zero, and the default precision to 1
@ -530,7 +530,7 @@ BasePrintLibSPrintMarker (
// //
// Flag space, +, 0, L & l are invalid for type p. // Flag space, +, 0, L & l are invalid for type p.
// //
Flags &= ~(PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE); Flags &= ~((UINTN) (PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE));
if (sizeof (VOID *) > 4) { if (sizeof (VOID *) > 4) {
Flags |= LONG_TYPE; Flags |= LONG_TYPE;
} }
@ -581,7 +581,7 @@ BasePrintLibSPrintMarker (
if ((Flags & RADIX_HEX) == 0) { if ((Flags & RADIX_HEX) == 0) {
Radix = 10; Radix = 10;
if (Comma) { if (Comma) {
Flags &= (~PREFIX_ZERO); Flags &= ~((UINTN) PREFIX_ZERO);
Precision = 1; Precision = 1;
} }
if (Value < 0) { if (Value < 0) {
@ -650,7 +650,7 @@ BasePrintLibSPrintMarker (
ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *); ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *);
} }
if (ArgumentString == NULL) { if (ArgumentString == NULL) {
Flags &= (~ARGUMENT_UNICODE); Flags &= ~((UINTN) ARGUMENT_UNICODE);
ArgumentString = "<null string>"; ArgumentString = "<null string>";
} }
// //