Commit db09e0e
ipv4/route: avoid unused-but-set-variable warning
BugLink: https://bugs.launchpad.net/bugs/2065857
[ Upstream commit cf1b720 ]
The log_martians variable is only used in an #ifdef, causing a 'make W=1'
warning with gcc:
net/ipv4/route.c: In function 'ip_rt_send_redirect':
net/ipv4/route.c:880:13: error: variable 'log_martians' set but not used [-Werror=unused-but-set-variable]
Change the #ifdef to an equivalent IS_ENABLED() to let the compiler
see where the variable is used.
Fixes: 30038fc ("net: ip_rt_send_redirect() optimization")
Reviewed-by: David Ahern <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Manuel Diewald <[email protected]>
Signed-off-by: Roxana Nicolescu <[email protected]>1 parent c31205e commit db09e0e
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
936 | | - | |
937 | | - | |
| 936 | + | |
938 | 937 | | |
939 | 938 | | |
940 | 939 | | |
941 | 940 | | |
942 | | - | |
943 | 941 | | |
944 | 942 | | |
945 | 943 | | |
| |||
0 commit comments