Skip to content

Commit

Permalink
ioctl.c: Fix build with linux 4.13
Browse files Browse the repository at this point in the history
git/ioctl.c:1127:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
   {0, },
    ^
note: (near initialization for 'verbosity_ctl_dir[1]')
git/ioctl.c:1136:3: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
   {0, },
    ^

Linux kernel has added -Werror=designated-init around 4.11 (c834f0e8a8b)
triggering build errors with gcc 5 and 6 (but not with gcc 4)

Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Cristian Stoica <[email protected]>
  • Loading branch information
ribalda authored and Cristian Stoica committed Oct 4, 2017
1 parent a705360 commit f0d6977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ static struct ctl_table verbosity_ctl_dir[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{0, },
{},
};

static struct ctl_table verbosity_ctl_root[] = {
Expand All @@ -1133,7 +1133,7 @@ static struct ctl_table verbosity_ctl_root[] = {
.mode = 0555,
.child = verbosity_ctl_dir,
},
{0, },
{},
};
static struct ctl_table_header *verbosity_sysctl_header;
static int __init init_cryptodev(void)
Expand Down

0 comments on commit f0d6977

Please sign in to comment.