This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]

gcc-4.6 warnings


I just committed some changes that eliminate several new warnings from
compiling with gcc 4.6 (Fedora 15).  Most are in the 'set but not used'
category.  Many of these are indeed harmless dead code and it's just
whittling things away to silence the warnings.  

But in two cases it turned out to be actual (typo-level) bugs that long
went easily unnoticed before we had these warnings.  So paying attention to
all these warnings and tweaking code to silence them does pay off.

There are still several new 'set but not used' warnings that I did not
eliminate.  I only did the ones where it was instantly obvious that it was
a trivial case of a variable that was wholly unused.  Others still left may
indicate actual bugs (ignoring status and returning success in NIS calls is
suspicious, but I'm not immediately sure it wasn't intended).  Or they may
be code patterns where it's just simpler to have a dummy variable for some
reason, and perhaps the warning is better than the alternatives.

I encourage other folks to try building libc with 4.6 or newer compilers
and find some clean changes that reduce compiler warnings in a libc build.


Thanks,
Roland


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