Commit cf1b720
ipv4/route: avoid unused-but-set-variable warning
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]>1 parent 7404348 commit cf1b720
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
930 | | - | |
| 929 | + | |
931 | 930 | | |
932 | 931 | | |
933 | 932 | | |
934 | 933 | | |
935 | | - | |
936 | 934 | | |
937 | 935 | | |
938 | 936 | | |
| |||
0 commit comments