Skip to contentSkip to conversation

socket: Fix missing-field-initializers build error.

PATCH New Vinson Lee 1 participant 1 message Aug 31, 2015

lore
Share & tools
lore

Vinson Lee

author
#0 lore raw

PATCH 1/1 socket: Fix missing-field-initializers build error.

From: Vinson Lee <[email protected]>

This patch fixes this build error.

CC syscalls/socket.o
syscalls/socket.c:48:2: error: missing initializer for field ‘func’ of ‘const struct socket_ptr’ [-Werror=missing-field-initializers]
[AF_ECONET] = { }, // DEAD
^
syscalls/socket.c:22:9: note: ‘func’ declared here

  void (*func)(struct socket_triplet *st);
         ^
---
 syscalls/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
syscalls/socket.c +1 -1
index 8beaf8d..94feb66 100644
@@ -45,7 +45,7 @@ static const struct socket_ptr socketptrs[] = {
 	[AF_NETLINK] = { .func = &netlink_rand_socket },
 	[AF_PACKET] = { .func = &packet_rand_socket },
 	[AF_ASH] = { .func = NULL },
-	[AF_ECONET] = {  },	// DEAD
+	[AF_ECONET] = { .func = NULL },	// DEAD
 	[AF_ATMSVC] = { .func = NULL },
 	[AF_RDS] = { .func = &rds_rand_socket },
 	[AF_SNA] = { .func = NULL },
Signature · 1 line
2.1.4