]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: fix complaints about unsigned char casting
authorDarrick J. Wong <djwong@kernel.org>
Wed, 15 Mar 2023 01:01:10 +0000 (18:01 -0700)
committerCarlos Maiolino <cem@kernel.org>
Fri, 17 Mar 2023 10:37:41 +0000 (11:37 +0100)
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@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
db/namei.c

index 00e8c8dc6d52a43e88277347281858d9f010fbbd..063721ca98f2ba0900f00b77fefa4a28cbaf1e24 100644 (file)
@@ -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;