From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 11319817D3 for ; Fri, 6 Jan 2017 00:50:53 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP; 06 Jan 2017 00:50:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,323,1477983600"; d="scan'208";a="50164066" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by fmsmga005.fm.intel.com with ESMTP; 06 Jan 2017 00:50:51 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Ruiyu Ni Date: Fri, 6 Jan 2017 16:50:50 +0800 Message-Id: <1483692650-33668-1-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 Subject: [PATCH] FatPkg: Explicitly declare FAT_CLUSTER_SPECIAL as unsigned type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2017 08:50:53 -0000 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. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- FatPkg/EnhancedFatDxe/FatFileSystem.h | 4 ++-- FatPkg/FatPei/FatLiteFmt.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FatPkg/EnhancedFatDxe/FatFileSystem.h b/FatPkg/EnhancedFatDxe/FatFileSystem.h index a4d4405..80cb802 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 d4f26f3..9872200 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) -- 1.9.5.msysgit.0