* [PATCH nf-next] netfilter: nf_tables: silence gcc warning with stateful object maps @ 2016-12-06 12:29 Pablo Neira Ayuso 2016-12-06 19:59 ` kbuild test robot 0 siblings, 1 reply; 2+ messages in thread From: Pablo Neira Ayuso @ 2016-12-06 12:29 UTC (permalink / raw) To: netfilter-devel; +Cc: kbuild test robot 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': >> net/netfilter/nf_tables_api.c:3003:15: warning: 'objtype' may be used +uninitialized in this function Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> --- net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 799eaa6808b9..789229663028 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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_OBJ_UNSPEC; timeout = 0; if (nla[NFTA_SET_TIMEOUT] != NULL) { -- 2.1.4 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf-next] netfilter: nf_tables: silence gcc warning with stateful object maps 2016-12-06 12:29 [PATCH nf-next] netfilter: nf_tables: silence gcc warning with stateful object maps Pablo Neira Ayuso @ 2016-12-06 19:59 ` kbuild test robot 0 siblings, 0 replies; 2+ messages in thread From: kbuild test robot @ 2016-12-06 19:59 UTC (permalink / raw) To: Pablo Neira Ayuso; +Cc: kbuild-all, netfilter-devel, kbuild test robot [-- Attachment #1: Type: text/plain, Size: 1409 bytes --] Hi Pablo, [auto build test ERROR on nf-next/master] url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-nf_tables-silence-gcc-warning-with-stateful-object-maps/20161207-033255 base: https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master config: x86_64-randconfig-x017-201649 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): net/netfilter/nf_tables_api.c: In function 'nf_tables_newset': >> net/netfilter/nf_tables_api.c:2924:13: error: 'NFT_OBJ_UNSPEC' undeclared (first use in this function) objtype = NFT_OBJ_UNSPEC; ^~~~~~~~~~~~~~ net/netfilter/nf_tables_api.c:2924:13: note: each undeclared identifier is reported only once for each function it appears in vim +/NFT_OBJ_UNSPEC +2924 net/netfilter/nf_tables_api.c 2918 if (objtype == NFT_OBJECT_UNSPEC || 2919 objtype > NFT_OBJECT_MAX) 2920 return -EINVAL; 2921 } else if (flags & NFT_SET_OBJECT) 2922 return -EINVAL; 2923 else > 2924 objtype = NFT_OBJ_UNSPEC; 2925 2926 timeout = 0; 2927 if (nla[NFTA_SET_TIMEOUT] != NULL) { --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 23483 bytes --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-06 20:00 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-12-06 12:29 [PATCH nf-next] netfilter: nf_tables: silence gcc warning with stateful object maps Pablo Neira Ayuso 2016-12-06 19:59 ` kbuild test robot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).