Re: [PATCH] xfs_db: fix complaints about unsigned char casting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 14, 2023 at 06:01:10PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Make the warnings about signed/unsigned char pointer casting go away.
> For printing dirent names it doesn't matter at all.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Looks good, will test.

Reviewed-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>

> ---
>  db/namei.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/db/namei.c b/db/namei.c
> index 00e8c8dc6d5..063721ca98f 100644
> --- a/db/namei.c
> +++ b/db/namei.c
> @@ -98,7 +98,7 @@ path_navigate(
> 
>  	for (i = 0; i < dirpath->depth; i++) {
>  		struct xfs_name	xname = {
> -			.name	= dirpath->path[i],
> +			.name	= (unsigned char *)dirpath->path[i],
>  			.len	= strlen(dirpath->path[i]),
>  		};
> 
> @@ -250,7 +250,7 @@ dir_emit(
>  	uint8_t			dtype)
>  {
>  	char			*display_name;
> -	struct xfs_name		xname = { .name = name };
> +	struct xfs_name		xname = { .name = (unsigned char *)name };
>  	const char		*dstr = get_dstr(mp, dtype);
>  	xfs_dahash_t		hash;
>  	bool			good;

-- 
Carlos Maiolino



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux