[nf-next:master 41/48] net/netfilter/nf_tables_api.c:3003:15: warning: 'objtype' may be used uninitialized in this function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
head:   34d360415a921406e622f60e202892af8cf4c57b
commit: bbf56b9c79b71b247caa9188998cd54b084445c1 [41/48] netfilter: nf_tables: add stateful object reference to set elements
config: x86_64-randconfig-x014-201649 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout bbf56b9c79b71b247caa9188998cd54b084445c1
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   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 [-Wmaybe-uninitialized]
     set->objtype = objtype;
     ~~~~~~~~~~~~~^~~~~~~~~

vim +/objtype +3003 net/netfilter/nf_tables_api.c

  2987		nla_strlcpy(name, nla[NFTA_SET_NAME], sizeof(set->name));
  2988		err = nf_tables_set_alloc_name(&ctx, set, name);
  2989		if (err < 0)
  2990			goto err2;
  2991	
  2992		udata = NULL;
  2993		if (udlen) {
  2994			udata = set->data + size;
  2995			nla_memcpy(udata, nla[NFTA_SET_USERDATA], udlen);
  2996		}
  2997	
  2998		INIT_LIST_HEAD(&set->bindings);
  2999		set->ops   = ops;
  3000		set->ktype = ktype;
  3001		set->klen  = desc.klen;
  3002		set->dtype = dtype;
> 3003		set->objtype = objtype;
  3004		set->dlen  = desc.dlen;
  3005		set->flags = flags;
  3006		set->size  = desc.size;
  3007		set->policy = policy;
  3008		set->udlen  = udlen;
  3009		set->udata  = udata;
  3010		set->timeout = timeout;
  3011		set->gc_int = gc_int;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux