Whamcloud - gitweb
LU-14093 llapi: remove ignored qualifier 12/43712/3
authorDominique Martinet <asmadeus@codewreck.org>
Sat, 15 May 2021 22:32:53 +0000 (07:32 +0900)
committerOleg Drokin <green@whamcloud.com>
Mon, 14 Jun 2021 16:43:58 +0000 (16:43 +0000)
Fixes the following warning on newer gcc with -Wextra:
.../include/lustre/lustreapi.h:1000:1: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
 1000 | const __u16 llapi_layout_string_flags(char *string);
      | ^~~~~

As the parameter is ignored, this should make no code difference

Test-parameters: trivial

Change-Id: I049166bbc586007cdecc93225d508693607ef04e
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Reviewed-on: https://review.whamcloud.com/43712
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre/lustreapi.h
lustre/utils/liblustreapi_layout.c

index 0e00c23..a938900 100644 (file)
@@ -1043,7 +1043,7 @@ int llapi_layout_file_create(const char *path, int open_flags, int mode,
 int llapi_layout_flags_set(struct llapi_layout *layout, uint32_t flags);
 int llapi_layout_flags_get(struct llapi_layout *layout, uint32_t *flags);
 const char *llapi_layout_flags_string(uint32_t flags);
-const __u16 llapi_layout_string_flags(char *string);
+__u16 llapi_layout_string_flags(char *string);
 
 /**
  * llapi_layout_mirror_count_get() - Get mirror count from the header of
index 8753998..aca20cc 100644 (file)
@@ -1684,7 +1684,7 @@ const char *llapi_layout_flags_string(uint32_t flags)
        return "0";
 }
 
-const __u16 llapi_layout_string_flags(char *string)
+__u16 llapi_layout_string_flags(char *string)
 {
        if (strncmp(string, "ro", strlen(string)) == 0)
                return LCM_FL_RDONLY;