]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Linux 4.13: use designated initializers where required
authorStephan Wiesand <stephan.wiesand@desy.de>
Mon, 24 Jul 2017 09:37:54 +0000 (11:37 +0200)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 19 Sep 2017 11:14:30 +0000 (07:14 -0400)
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 <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d55b41072ce873210481baa4cae5c7143011869b)

Change-Id: I9797f8b1e16ab095775c53ac03e258affaa4d303
Reviewed-on: https://gerrit.openafs.org/12664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_misc.c
src/afs/LINUX/osi_sysctl.c

index 32ee5a62042665a0943149a3219dd9fc1a47a142..50dd625e984dee4ee7315ce91a5d3d41da341c66 100644 (file)
@@ -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);
index 2b1be3b0c6ceb4d4f63734490a4a7062036235ca..4d56c4eb99c7a584a9f397049fe55ed6c506e2c0 100644 (file)
@@ -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