mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
(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:
parent
108c465176
commit
8d84972533
@ -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))
|
||||
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user