GwenNelson / distcc

Automatically exported from code.google.com/p/distcc
GNU General Public License v2.0
0 stars 0 forks source link

Fix unused result warning on GCC 4.3 #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is a patch that suppresses the warnings emitted by GCC 4.3 about
unused return value. Although the warnings were harmless, they caused
distcc build process to failed (since the -Werror flag is used by default).

Original issue reported on code.google.com by avassalo...@gmail.com on 26 Apr 2009 at 1:01

Attachments:

GoogleCodeExporter commented 9 years ago
Generally, functions marked as warn_unused_result are marked that way because 
it is *never* correct to ignore the return value.  Looking at the supplied 
patch, the changes in src/stats.c and src/trace.c suppress the warning without 
adding any code to handle an error return.  Rather than unconditionally hide 
the warnings, it would be better to leave any warnings that you do not fix at 
this time, so that someone can easily find them later to address them by adding 
real error handling.

Modern distcc includes a configure option --disable-Werror that can be used to 
make warnings non-fatal if your goal is simply to build a working distcc.

Original comment by google.8...@spamgourmet.com on 4 Sep 2010 at 11:56

GoogleCodeExporter commented 9 years ago
As of SVN r763, gcc 4.6.1 builds the full distcc suite with no warnings (it 
builds successfully with -Werror).

Original comment by kamal@whence.com on 5 Apr 2012 at 9:55