[parted-devel] comparison between signed and unsigned

Jim Meyering jim at meyering.net
Thu May 29 20:32:09 UTC 2008


Colin Watson <cjwatson at ubuntu.com> wrote:
> 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!  I'd be happy to apply that.
Next time, please send patches as output from "git format-patch"
so I can simply apply it with "git am PATCH".  Then I'll be even happier ;-)
because I won't have to take the time to write the log entry and to
arrange to have your name on it.

BTW, the format of the log message is important, since the goal
is to generate GNU Coding Standards-compliant ChangeLog entries
from it, as I've begun doing in coreutils and idutils.
Here's what I'm about to push:



More information about the parted-devel mailing list