Skip to contentSkip to conversation

xfs: fix xfs_mode_to_ftype() prototype

PATCH Applied Arnd Bergmann 3 participants 3 messages Jan 18, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: fix xfs_mode_to_ftype() prototype

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")
---
 fs/xfs/libxfs/xfs_dir2.c | 2 +-
 fs/xfs/libxfs/xfs_dir2.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/xfs/libxfs/xfs_dir2.c +1 -1
index eb64f3884d3d..2f389d366e93 100644
@@ -38,7 +38,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:
fs/xfs/libxfs/xfs_dir2.h +1 -1
index d4b77ab37a98..d6e6d9d16f6c 100644
@@ -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
Signature · 1 line
2.9.0
#2 lore raw
In reply to Arnd Bergmann
Quoted 9 lines · Arnd Bergmann

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")

Applied, thanks.

--D

Quoted 38 lines
---
 fs/xfs/libxfs/xfs_dir2.c | 2 +-
 fs/xfs/libxfs/xfs_dir2.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/xfs/libxfs/xfs_dir2.c +1 -1
index eb64f3884d3d..2f389d366e93 100644
@@ -38,7 +38,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:
fs/xfs/libxfs/xfs_dir2.h +1 -1
index d4b77ab37a98..d6e6d9d16f6c 100644
@@ -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
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html