netfilter: nf_tables: silence gcc warning with stateful object maps
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH v2 1/1 netfilter: nf_tables: silence gcc warning with stateful object maps
Not a problem in practise since objtype is ignored if the NFT_SET_OBJECT flag is not set.
But call down gcc warnings:
net/netfilter/nf_tables_api.c: In function 'nf_tables_newset':
Quoted 1 line
Quoted 1 line
net/netfilter/nf_tables_api.c:3003:15: warning: 'objtype' may be used
+uninitialized in this function
Reported-by kbuild test robot <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
---
v2: should be NFT_OBJECT_UNSPEC, not NFT_OBJ_UNSPEC
net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+)
net/netfilter/nf_tables_api.c +2 -0
@@ -2920,6 +2920,8 @@ static int nf_tables_newset(struct net *net, struct sock *nlsk,return -EINVAL ; }else if (flags &NFT_SET_OBJECT )return -EINVAL ; +else + objtype =NFT_OBJECT_UNSPEC ; timeout =0 ;if (nla[NFTA_SET_TIMEOUT ] !=NULL ) {
Signature · 1 line
2.1.4