[PATCH 3.14] net: sysctl_net_core: remove compiler warning about unused variable 'one'

Subsystems: networking [general], the rest

STALE4013d

2 messages, 2 authors, 2015-08-11 · open the first message on its own page

[PATCH 3.14] net: sysctl_net_core: remove compiler warning about unused variable 'one'

From: Vladimir Zapolskiy <hidden>
Date: 2015-08-11 12:44:09

From: Dirk Behme <redacted>

Remove the compiler warning

  net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable]
     static int one = 1;

introduced by the 3.14.37 stable commit a1d55b36de6bf2 ("net: sysctl_net_core:
check SNDBUF and RCVBUF for min length") which made 'one' obsolete (in
contrast to recent mainline kernel, which still uses 'one').

Signed-off-by: Dirk Behme <redacted>
Signed-off-by: Vladimir Zapolskiy <redacted>
Cc: <redacted>
Cc: <redacted> # 3.14.x-
Fixes: a1d55b36de6b ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length")
---
 net/core/sysctl_net_core.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index e731c96..8725b91 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -23,7 +23,6 @@
 #include <net/pkt_sched.h>
 
 static int zero = 0;
-static int one = 1;
 static int ushort_max = USHRT_MAX;
 static int min_sndbuf = SOCK_MIN_SNDBUF;
 static int min_rcvbuf = SOCK_MIN_RCVBUF;
-- 
2.1.4

Re: [PATCH 3.14] net: sysctl_net_core: remove compiler warning about unused variable 'one'

From: Dirk Behme <hidden>
Date: 2015-08-11 13:54:14

On 11.08.2015 14:42, Vladimir Zapolskiy wrote:
From: Dirk Behme <redacted>

Remove the compiler warning

   net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable]
      static int one = 1;

introduced by the 3.14.37 stable commit a1d55b36de6bf2 ("net: sysctl_net_core:
check SNDBUF and RCVBUF for min length") which made 'one' obsolete (in
contrast to recent mainline kernel, which still uses 'one').

Signed-off-by: Dirk Behme <redacted>
Signed-off-by: Vladimir Zapolskiy <redacted>
Cc: <redacted>
Cc: <redacted> # 3.14.x-
Fixes: a1d55b36de6b ("net: sysctl_net_core: check SNDBUF and RCVBUF for min length")

It seems that this has been sent previously and was rejected:

http://www.spinics.net/lists/stable/msg87281.html

http://www.spinics.net/lists/stable/msg87282.html

Best regards

Dirk
quoted hunk
---
  net/core/sysctl_net_core.c | 1 -
  1 file changed, 1 deletion(-)
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index e731c96..8725b91 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -23,7 +23,6 @@
  #include <net/pkt_sched.h>

  static int zero = 0;
-static int one = 1;
  static int ushort_max = USHRT_MAX;
  static int min_sndbuf = SOCK_MIN_SNDBUF;
  static int min_rcvbuf = SOCK_MIN_RCVBUF;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help