From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1D1LP9-0005y2-Ke for mharc-grub-devel@gnu.org; Wed, 16 Feb 2005 04:23:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D1LP4-0005x8-NE for grub-devel@gnu.org; Wed, 16 Feb 2005 04:23:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D1LP2-0005wn-GI for grub-devel@gnu.org; Wed, 16 Feb 2005 04:23:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D1LNl-0005jD-6v for grub-devel@gnu.org; Wed, 16 Feb 2005 04:22:05 -0500 Received: from [208.186.28.7] (helo=mail.nebonet.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D1Kyq-0006ko-G1 for grub-devel@gnu.org; Wed, 16 Feb 2005 03:56:20 -0500 Received: from localhost (scanner.nebonet.com [208.186.28.8]) by mail.nebonet.com (Postfix) with ESMTP id 9034C19DD22 for ; Wed, 16 Feb 2005 01:56:19 -0700 (MST) Received: from mail.nebonet.com ([208.186.28.7]) by localhost (scanner [208.186.28.8]) (amavisd-new, port 10024) with LMTP id 27389-01-4 for ; Wed, 16 Feb 2005 01:56:17 -0700 (MST) Received: from [127.0.0.1] (f4s.dsl.xmission.com [166.70.40.38]) by mail.nebonet.com (Postfix) with ESMTP id DC31419DD21 for ; Wed, 16 Feb 2005 01:56:16 -0700 (MST) Message-ID: <42130AAA.7030500@omniflux.com> Date: Wed, 16 Feb 2005 01:56:10 -0700 From: Omniflux User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: grub-devel@gnu.org Content-Type: multipart/mixed; boundary="------------020305010802010600040503" X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at nebonet.com Subject: fs/fat.c assumes that 0UL is the same for 32bit and 64bit archs X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Feb 2005 09:23:28 -0000 This is a multi-part message in MIME format. --------------020305010802010600040503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit fs/fat.c assumes that 0UL is the same for 32bit and 64bit archs, but it is not. There are four locations in fs/fat.c where a 32bit unsigned int is set equal to 0UL. This causes warnings when compiling on 64bit architectures as 0UL is 0xffffffffffffffff (64bits) there. -- Omniflux --------------020305010802010600040503 Content-Type: text/plain; name="0UL-fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="0UL-fix.diff" --- grub2/fs/fat.c 2004-08-28 07:14:29.000000000 -0600 +++ grub2.modified/fs/fat.c 2005-02-16 00:39:25.271409504 -0700 @@ -243,7 +243,7 @@ else { /* FAT12 or FAT16. */ - data->root_cluster = ~0UL; + data->root_cluster = 0xffffffff; if (data->num_clusters <= 4085 + 2) { @@ -293,7 +293,7 @@ /* Start from the root directory. */ data->file_cluster = data->root_cluster; - data->cur_cluster_num = ~0UL; + data->cur_cluster_num = 0xffffffff; data->attr = GRUB_FAT_ATTR_DIRECTORY; return data; @@ -318,7 +318,7 @@ /* This is a special case. FAT12 and FAT16 doesn't have the root directory in clusters. */ - if (data->file_cluster == ~0UL) + if (data->file_cluster == 0xffffffff) { size = (data->num_root_sectors << GRUB_DISK_SECTOR_BITS) - offset; if (size > len) @@ -613,7 +613,7 @@ data->file_size = grub_le_to_cpu32 (dir.file_size); data->file_cluster = ((grub_le_to_cpu16 (dir.first_cluster_high) << 16) | grub_le_to_cpu16 (dir.first_cluster_low)); - data->cur_cluster_num = ~0UL; + data->cur_cluster_num = 0xffffffff; return dirp; } --------------020305010802010600040503--