From 4c5ee6a694aa755c90bcbcded88cf50758b5cb4d Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Thu, 17 Nov 2016 15:57:43 +0800 Subject: FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type In FatPkg, cluster-related varibles are declared as unsigned type (e.g. UINT32/UINTN). To keep the comparisions involving those variables type-matched, declare the definition FAT_CLUSTER_SPECIAL as unsigned type explicitly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Ruiyu Ni --- FatPkg/EnhancedFatDxe/FatFileSystem.h | 4 ++-- FatPkg/FatPei/FatLiteFmt.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'FatPkg') diff --git a/FatPkg/EnhancedFatDxe/FatFileSystem.h b/FatPkg/EnhancedFatDxe/FatFileSystem.h index a4d44054e1..80cb802b08 100644 --- a/FatPkg/EnhancedFatDxe/FatFileSystem.h +++ b/FatPkg/EnhancedFatDxe/FatFileSystem.h @@ -1,7 +1,7 @@ /** @file Definitions for on-disk FAT structures. -Copyright (c) 2005, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // FAT entry values // -#define FAT_CLUSTER_SPECIAL_EXT (-1 & (~0xF)) +#define FAT_CLUSTER_SPECIAL_EXT (MAX_UINTN & (~0xF)) #define FAT_CLUSTER_SPECIAL ((FAT_CLUSTER_SPECIAL_EXT) | 0x07) #define FAT_CLUSTER_FREE 0 #define FAT_CLUSTER_RESERVED (FAT_CLUSTER_SPECIAL) diff --git a/FatPkg/FatPei/FatLiteFmt.h b/FatPkg/FatPei/FatLiteFmt.h index d4f26f3540..9872200090 100644 --- a/FatPkg/FatPei/FatLiteFmt.h +++ b/FatPkg/FatPei/FatLiteFmt.h @@ -1,7 +1,7 @@ /** @file FAT format data structures -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this @@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define FAT_ATTR_ARCHIVE 0x20 #define FAT_ATTR_LFN (FAT_ATTR_READ_ONLY | FAT_ATTR_HIDDEN | FAT_ATTR_SYSTEM | FAT_ATTR_VOLUME_ID) -#define FAT_CLUSTER_SPECIAL ((-1 &~0xF) | 0x7) +#define FAT_CLUSTER_SPECIAL ((MAX_UINT32 &~0xF) | 0x7) #define FAT_CLUSTER_FREE 0 #define FAT_CLUSTER_RESERVED (FAT_CLUSTER_SPECIAL) #define FAT_CLUSTER_BAD (FAT_CLUSTER_SPECIAL) -- cgit v1.2.3