This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug general/21011] "may be used uninitialized" error with -Werror=maybe-uninitialized


https://sourceware.org/bugzilla/show_bug.cgi?id=21011

--- Comment #9 from Luiz Angelo Daros de Luca <luizluca at gmail dot com> ---

./configure is called as:

AR="i486-openwrt-linux-musl-gcc-ar" AS="i486-openwrt-linux-musl-gcc -c -Os
-pipe -march=pentium4 -fno-caller-saves -fno-plt -fhonour-copts
-Wno-error=unused-but-set-variable -Wno-error=unused-result
-iremap/home/REDETRESC/luizluca/prog-local/lede/trunk/build_dir/target-i386_pentium4_musl/elfutils-0.168:elfutils-0.168
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
-D_GNU_SOURCE" LD=i486-openwrt-linux-musl-ld
NM="i486-openwrt-linux-musl-gcc-nm" CC="i486-openwrt-linux-musl-gcc"
GCC="i486-openwrt-linux-musl-gcc" CXX="i486-openwrt-linux-musl-g++"
RANLIB="i486-openwrt-linux-musl-gcc-ranlib" STRIP=i486-openwrt-linux-musl-strip
OBJCOPY=i486-openwrt-linux-musl-objcopy OBJDUMP=i486-openwrt-linux-musl-objdump
SIZE=i486-openwrt-linux-musl-size CFLAGS="-Os -pipe -march=pentium4
-fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable
-Wno-error=unused-result
-iremap/home/REDETRESC/luizluca/prog-local/lede/trunk/build_dir/target-i386_pentium4_musl/elfutils-0.168:elfutils-0.168
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
-D_GNU_SOURCE " CXXFLAGS="-Os -pipe -march=pentium4 -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
-iremap/home/REDETRESC/luizluca/prog-local/lede/trunk/build_dir/target-i386_pentium4_musl/elfutils-0.168:elfutils-0.168
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
-D_GNU_SOURCE "
CPPFLAGS="-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/usr/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/include/fortify
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
"
LDFLAGS="-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib
-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/lib
-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/usr/lib
-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/lib
-znow -zrelro
-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/lib
-Wl,-rpath-link=/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/lib
-L/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/lib
-Wl,-rpath-link=/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/lib
"  LIBS="-largp"  ./configure --target=i486-openwrt-linux
--host=i486-openwrt-linux --build=x86_64-pc-linux-gnu --program-prefix=""
--program-suffix="" --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --libexecdir=/usr/lib --sysconfdir=/etc
--datadir=/usr/share --localstatedir=/var --mandir=/usr/man --infodir=/usr/info
--disable-nls   --without-lzma

My GCC is:

i486-openwrt-linux-musl-gcc --version
i486-openwrt-linux-musl-gcc (LEDE GCC 5.4.0 r3621-357efba9bb) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This is my gcc call that fails:

i486-openwrt-linux-musl-gcc -D_GNU_SOURCE -DHAVE_CONFIG_H
-DLOCALEDIR='"/usr/share/locale"' -I. -I..  -I. -I. -I../lib -I..
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/usr/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/include/fortify
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/toolchain-i386_pentium4_gcc-5.4.0_musl/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
 -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition
-Wstrict-prototypes -Wlogical-op    -Werror -Wunused -Wextra
-Wstack-usage=262144   -Os -pipe -march=pentium4 -fno-caller-saves -fno-plt
-fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result
-iremap/home/REDETRESC/luizluca/prog-local/lede/trunk/build_dir/target-i386_pentium4_musl/elfutils-0.168:elfutils-0.168
-Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1
-Wl,-z,now -Wl,-z,relro
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libiconv-stub/include
-I/home/REDETRESC/luizluca/prog-local/lede/trunk/staging_dir/target-i386_pentium4_musl/usr/lib/libintl-stub/include
-D_GNU_SOURCE  -DBAD_FTS=1 -MT elf_getarsym.o -MD -MP -MF
.deps/elf_getarsym.Tpo -c -o elf_getarsym.o elf_getarsym.c

elf_getarsym.c: In function 'elf_getarsym':
elf_getarsym.c:206:11: error: 'n' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
    size_t sz = n * w;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]