[parted-devel] comparison between signed and unsigned

Colin Watson cjwatson at ubuntu.com
Thu May 29 20:14:49 UTC 2008


Hi,

Applying commit 8bd3645d7c184ac6a4076414b469ece15fbcccde to the current
Ubuntu version of parted yields this warning (promoted to an error by
-Werror):

  ../../../../libparted/fs/fat/traverse.c: In function ‘fat_dir_entry_get_name’:
  ../../../../libparted/fs/fat/traverse.c:354: error: comparison between signed and unsigned
  ../../../../libparted/fs/fat/traverse.c:362: error: comparison between signed and unsigned

I suggest applying the following patch (against current HEAD):

diff --git a/libparted/fs/fat/traverse.c b/libparted/fs/fat/traverse.c
index d3f0d35..37789d5 100644
--- a/libparted/fs/fat/traverse.c
+++ b/libparted/fs/fat/traverse.c
@@ -341,7 +341,7 @@ fat_dir_entry_has_first_cluster (FatDirEntry* dir_entry, PedFileSystem* fs)
 */
 void
 fat_dir_entry_get_name (const FatDirEntry *dir_entry, char *result) {
-	int     i;
+	size_t  i;
 	const char *src;
 	const char *ext;
 

Thanks,

-- 
Colin Watson                                       [cjwatson at ubuntu.com]



More information about the parted-devel mailing list