On 07/23/2018 04:38 AM, Oleksandr Andrushchenko wrote:
On 07/20/2018 05:08 PM, Boris Ostrovsky wrote:
data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c: In function ‘gntdev_ioctl_dmabuf_exp_from_refs’: /data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c:503:6: warning: ‘args.fd’ may be used uninitialized in this function [-Wmaybe-uninitialized] *fd = args.fd; ~~~~^~~~~~~~~ /data/upstream/linux-xen/drivers/xen/gntdev-dmabuf.c:467:35: note: ‘args.fd’ was declared here struct gntdev_dmabuf_export_args args; ^~~~
Strangely, but my i386 build goes smooth. Which version of gcc you use and could you please give me your .config, so I can test the same?
gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
I wonder whether if (IS_ERR(gntdev_dmabuf->dmabuf)) { ret = PTR_ERR(gntdev_dmabuf->dmabuf); gntdev_dmabuf->dmabuf = NULL; goto fail; } confuses the compiler somehow.
64-bit x86 and 32-bit ARM don't complain.
-boris