mirror of
https://github.com/torvalds/linux.git
synced 2024-12-25 20:32:22 +00:00
nf_conntrack: fix -Wunused-const-variable=
When building with W=1, the following warning occurs.
net/netfilter/nf_conntrack_proto_dccp.c:72:27: warning: ‘dccp_state_names’ defined but not used [-Wunused-const-variable=]
static const char * const dccp_state_names[] = {
We include dccp_state_names in the macro
CONFIG_NF_CONNTRACK_PROCFS, since it is only used in the place
which is included in the macro CONFIG_NF_CONNTRACK_PROCFS.
Fixes: 2bc780499a
("[NETFILTER]: nf_conntrack: add DCCP protocol support")
Signed-off-by: Zhu Wang <wangzhu9@huawei.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
bc758ade61
commit
a927d77778
@ -69,6 +69,7 @@
|
||||
|
||||
#define DCCP_MSL (2 * 60 * HZ)
|
||||
|
||||
#ifdef CONFIG_NF_CONNTRACK_PROCFS
|
||||
static const char * const dccp_state_names[] = {
|
||||
[CT_DCCP_NONE] = "NONE",
|
||||
[CT_DCCP_REQUEST] = "REQUEST",
|
||||
@ -81,6 +82,7 @@ static const char * const dccp_state_names[] = {
|
||||
[CT_DCCP_IGNORE] = "IGNORE",
|
||||
[CT_DCCP_INVALID] = "INVALID",
|
||||
};
|
||||
#endif
|
||||
|
||||
#define sNO CT_DCCP_NONE
|
||||
#define sRQ CT_DCCP_REQUEST
|
||||
|
Loading…
Reference in New Issue
Block a user