[Ltrace-devel] ERROR: 'entry.a_un.a_val' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Petr Machata pmachata at redhat.com
Thu Nov 8 18:01:17 UTC 2012


Sedat Dilek <sedat.dilek at gmail.com> writes:

> On Fri, Nov 2, 2012 at 5:45 PM, Sedat Dilek <sedat.dilek at gmail.com> wrote:
>> From my build-log...
>> [...]
>> proc.c  -fPIC -DPIC -o .libs/proc.o
>> proc.c: In function 'process_get_entry':
>> proc.c:674:28: error: 'entry.a_un.a_val' may be used uninitialized in
>
> Anyone has a fix for this issue?
> With modern gcc-versions (here I use gcc-4.7.2-RC) this warning is
> treated as an error (see also gcc-manual chapter "3.8 Options to

Sorry, I forgot about this one.

The warning is treated as error because we build with -Werror.

I tried to build ltrace on Fedora 17 and Fedora 18 (both have GCC
4.7.2), and I'm not getting this warning.  It also seems invalid to me,
"entry" should be initialized properly in the fetch_auxv{32,64}_entry.
Perhaps there was a related bugfix between RC and final?  Perhaps
consider updating to final.

I put in an explicit initialization (though it should be entirely
unnecessary), hopefully this will make the warning go away.

Thanks,
PM



More information about the Ltrace-devel mailing list