]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: fix xfs_mode_to_ftype() prototype
authorArnd Bergmann <arnd@arndb.de>
Thu, 16 Feb 2017 03:03:54 +0000 (21:03 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 16 Feb 2017 03:03:54 +0000 (21:03 -0600)
Source kernel commit: fd29f7af75b7adf250beccffa63746c6a88e2b74

A harmless warning just got introduced:

fs/xfs/libxfs/xfs_dir2.h:40:8: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]

Removing the 'const' modifier avoids the warning and has no
other effect.

Fixes: 1fc4d33fed12 ("xfs: replace xfs_mode_to_ftype table with switch statement")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_dir2.c
libxfs/xfs_dir2.h

index 34602de13a960e18d4cad3a142132cd4efccfa02..817bcfdd7786b12d159ba16cd9df50992781088d 100644 (file)
@@ -36,7 +36,7 @@ struct xfs_name xfs_name_dotdot = { (unsigned char *)"..", 2, XFS_DIR3_FT_DIR };
 /*
  * Convert inode mode to directory entry filetype
  */
-const unsigned char xfs_mode_to_ftype(int mode)
+unsigned char xfs_mode_to_ftype(int mode)
 {
        switch (mode & S_IFMT) {
        case S_IFREG:
index d4b77ab37a98eb80a78fd41021ef2817ea0040ca..d6e6d9d16f6c30d90e88f742c077782bc678b86f 100644 (file)
@@ -37,7 +37,7 @@ extern struct xfs_name        xfs_name_dotdot;
 /*
  * Convert inode mode to directory entry filetype
  */
-extern const unsigned char xfs_mode_to_ftype(int mode);
+extern unsigned char xfs_mode_to_ftype(int mode);
 
 /*
  * directory operations vector for encode/decode routines