(extfs_get_archive_name): fix -Wcast-qual warning.

extfs.c:799:24: warning: cast from 'const struct extfs_super_t *' to 'struct vfs_s_super *' drops const qualifier [-Wcast-qual]
        archive_name = VFS_SUPER (archive)->name;
                       ^
../../../lib/vfs/xdirentry.h:39:46: note: expanded from macro 'VFS_SUPER'
#define VFS_SUPER(a) ((struct vfs_s_super *) (a))
                                             ^

Found by Clang-11

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andreas Mohr 2020-12-22 16:25:32 +00:00 committed by Andrew Borodin
parent 108c465176
commit 8d84972533
2 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@
#define VFS_SUBCLASS(a) ((struct vfs_s_subclass *) (a))
#define VFS_SUPER(a) ((struct vfs_s_super *) (a))
#define CONST_VFS_SUPER(a) ((const struct vfs_s_super *) (a))
#define VFS_ENTRY(a) ((struct vfs_s_entry *) (a))
#define VFS_INODE(a) ((struct vfs_s_inode *) (a))

View File

@ -887,7 +887,7 @@ extfs_get_archive_name (const struct extfs_super_t *archive)
if (archive->local_name != NULL)
archive_name = archive->local_name;
else
archive_name = VFS_SUPER (archive)->name;
archive_name = CONST_VFS_SUPER (archive)->name;
if (archive_name == NULL || *archive_name == '\0')
return g_strdup ("no_archive_name");