[lxc-users] Failure to compile with gcc 4.9.0 due to -Werror=maybe-unitialized

Leonid Isaev lisaev at umail.iu.edu
Tue Jun 17 02:30:00 UTC 2014


Hi,

	I am trying to compile lxc git master and getting this gcc error:
------
bdev.c: In function ‘bdev_create’:
bdev.c:3104:7: error: ‘saveptr’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if ((bdev = do_bdev_create(dest, token, cname, specs)))
...
cc1: all warnings being treated as errors
Makefile:1133: recipe for target 'liblxc_so-bdev.o' failed
make[3]: *** [liblxc_so-bdev.o] Error 1
make[3]: *** Waiting for unfinished jobs....
------

The gcc version and CFLAGS are
------
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc/src/gcc-4.9-20140604/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --disable-cloog-version-check --enable-lto
--enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu
--disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.9.0 20140604 (prerelease) (GCC)
$ echo $CFLAGS
-march=x86-64 -mtune=generic -O1 -pipe -fstack-protector-all -fexceptions -fno-delete-null-pointer-checks --param=ssp-buffer-size=4
------

Has anyone seen this?

Thanks,
Leonid.

-- 
Leonid Isaev
GPG fingerprints: DA92 034D B4A8 EC51 7EA6  20DF 9291 EE8A 043C B8C4
                  C0DF 20D0 C075 C3F1 E1BE  775A A7AE F6CB 164B 5A6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140616/6229a016/attachment.sig>


More information about the lxc-users mailing list