From cbf9f6f27ce73ca54e54c672e349e66459d11b25 Mon Sep 17 00:00:00 2001 From: Stephan Wiesand Date: Mon, 24 Jul 2017 11:37:54 +0200 Subject: [PATCH] Linux 4.13: use designated initializers where required struct path is declared with the "designated_init" attribute, and module builds now use -Werror=designated-init. Cope. And as pointed out by Michael Meffie, struct ctl_table has the same requirement now, so use a designated initializer for the final element of the sysctl table too. Reviewed-on: https://gerrit.openafs.org/12663 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk (cherry picked from commit d55b41072ce873210481baa4cae5c7143011869b) Change-Id: I9797f8b1e16ab095775c53ac03e258affaa4d303 --- src/afs/LINUX/osi_misc.c | 2 +- src/afs/LINUX/osi_sysctl.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c index 32ee5a620..50dd625e9 100644 --- a/src/afs/LINUX/osi_misc.c +++ b/src/afs/LINUX/osi_misc.c @@ -143,7 +143,7 @@ int osi_abspath(char *aname, char *buf, int buflen, code = osi_lookupname_internal(name, followlink, &mnt, &dp); if (!code) { #if defined(D_PATH_TAKES_STRUCT_PATH) - afs_linux_path_t p = { mnt, dp }; + afs_linux_path_t p = { .mnt = mnt, .dentry = dp }; path = d_path(&p, buf, buflen); #else path = d_path(dp, mnt, buf, buflen); diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c index 2b1be3b0c..4d56c4eb9 100644 --- a/src/afs/LINUX/osi_sysctl.c +++ b/src/afs/LINUX/osi_sysctl.c @@ -231,7 +231,9 @@ static struct ctl_table afs_sysctl_table[] = { .mode = 0644, .proc_handler = &proc_dointvec }, - {0} + { + .procname = 0 + } }; static struct ctl_table fs_sysctl_table[] = { @@ -247,7 +249,9 @@ static struct ctl_table fs_sysctl_table[] = { .mode = 0555, .child = afs_sysctl_table }, - {0} + { + .procname = 0 + } }; int -- 2.14.1