Skip to contentSkip to conversation

sctp: fix unused lable warning

PATCH Applied Arnd Bergmann 3 participants 3 messages Mar 28, 2018 – Mar 29, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sctp: fix unused lable warning

The proc file cleanup left a label possibly unused:

net/sctp/protocol.c: In function 'sctp_defaults_init':
net/sctp/protocol.c:1304:1: error: label 'err_init_proc' defined but not used [-Werror=unused-label]

This adds an #ifdef around it to match the respective 'goto'.

Fixes d47d08c8ca05 ("sctp: use proc_remove_subtree()")
---
 net/sctp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)
net/sctp/protocol.c +2 -0
index c1c64b78c39d..d685f8456762 100644
@@ -1301,8 +1301,10 @@ static int __net_init sctp_defaults_init(struct net *net)
 
 	return 0;
 
+#ifdef CONFIG_PROC_FS
 err_init_proc:
 	cleanup_sctp_mibs(net);
+#endif
 err_init_mibs:
 	sctp_sysctl_net_unregister(net);
 err_sysctl_register:
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw
Quoted 32 lines · Arnd Bergmann

The proc file cleanup left a label possibly unused:

net/sctp/protocol.c: In function 'sctp_defaults_init':
net/sctp/protocol.c:1304:1: error: label 'err_init_proc' defined but not used [-Werror=unused-label]

This adds an #ifdef around it to match the respective 'goto'.

Fixes d47d08c8ca05 ("sctp: use proc_remove_subtree()")
---
 net/sctp/protocol.c | 2 ++
 1 file changed, 2 insertions(+)
net/sctp/protocol.c +2 -0
index c1c64b78c39d..d685f8456762 100644
@@ -1301,8 +1301,10 @@ static int __net_init sctp_defaults_init(struct net *net)
 
 	return 0;
 
+#ifdef CONFIG_PROC_FS
 err_init_proc:
 	cleanup_sctp_mibs(net);
+#endif
 err_init_mibs:
 	sctp_sysctl_net_unregister(net);
 err_sysctl_register:
Signature · 1 line
2.9.0
maintainer Applied
#2 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Wed, 28 Mar 2018 16:14:56 +0200

Quoted 9 lines

The proc file cleanup left a label possibly unused:

net/sctp/protocol.c: In function 'sctp_defaults_init':
net/sctp/protocol.c:1304:1: error: label 'err_init_proc' defined but not used [-Werror=unused-label]

This adds an #ifdef around it to match the respective 'goto'.

Fixes d47d08c8ca05 ("sctp: use proc_remove_subtree()")

Applied.