summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2020-04-29 12:16:04 +0300
committerSunny Kumar <sunkumar@redhat.com>2020-04-30 13:34:43 +0000
commit13f3654bc7f5acd8df38b66ab8c28397dacf405e (patch)
tree0493d5bedca8016f7d40c04498cd33c4c28f2487 /xlators/storage/posix/src
parent4faf18006f838bb28b45a5d44edb5fff0439c5ae (diff)
storage/posix: fix initialization warning reported with clang-10
xlators/storage/posix/src/posix-common.c:1440:18: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .validate = GF_OPT_VALIDATE_MAX, ^~~~~~~~~~~~~~~~~~~ xlators/storage/posix/src/posix-common.c:1439:18: note: previous initialization is here .validate = GF_OPT_VALIDATE_MIN, ^~~~~~~~~~~~~~~~~~~ [4 times] Use GF_OPT_VALIDATE_BOTH for min/max-bounded values. Fixes: #1208 Change-Id: I073a27d23176f3b4a126f2eb50c079374a11418d Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Diffstat (limited to 'xlators/storage/posix/src')
-rw-r--r--xlators/storage/posix/src/posix-common.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index da9c653218f..609ddea2560 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -1436,24 +1436,21 @@ struct volume_options posix_options[] = {
.min = 0000,
.max = 0777,
.default_value = "0000",
- .validate = GF_OPT_VALIDATE_MIN,
- .validate = GF_OPT_VALIDATE_MAX,
+ .validate = GF_OPT_VALIDATE_BOTH,
.description = "Mode bit permission that will always be set on a file."},
{.key = {"force-directory-mode"},
.type = GF_OPTION_TYPE_INT,
.min = 0000,
.max = 0777,
.default_value = "0000",
- .validate = GF_OPT_VALIDATE_MIN,
- .validate = GF_OPT_VALIDATE_MAX,
+ .validate = GF_OPT_VALIDATE_BOTH,
.description = "Mode bit permission that will be always set on directory"},
{.key = {"create-mask"},
.type = GF_OPTION_TYPE_INT,
.min = 0000,
.max = 0777,
.default_value = "0777",
- .validate = GF_OPT_VALIDATE_MIN,
- .validate = GF_OPT_VALIDATE_MAX,
+ .validate = GF_OPT_VALIDATE_BOTH,
.description = "Any bit not set here will be removed from the"
"modes set on a file when it is created"},
{.key = {"create-directory-mask"},
@@ -1461,8 +1458,7 @@ struct volume_options posix_options[] = {
.min = 0000,
.max = 0777,
.default_value = "0777",
- .validate = GF_OPT_VALIDATE_MIN,
- .validate = GF_OPT_VALIDATE_MAX,
+ .validate = GF_OPT_VALIDATE_BOTH,
.description = "Any bit not set here will be removed from the"
"modes set on a directory when it is created"},
{.key = {"max-hardlinks"},