minaco2 / distcc

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

src/stats.c variable 'ret' set but not used #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Answering the following questions is a big help:

1. What version of distcc are you using (e.g. "2.7.1")? 
I checked out the sourcecode yesterday (13.02.2012)

2. What platform are you running on (e.g. "Red Hat 8.0", "HP-UX 11.11")?  
OpenSuse 12.1 / gcc 4.6.2

3. What were you trying to do (e.g. "install distcc", "build Mozilla")?
I try a make

4. What went wrong? 
I got this error: src/stats.c:366:13: error: variable ‘ret’ set but not 
used [-Werror=unused-but-set-variable]

This error is not the first one like that it was fixed for the other file but i 
don't know why I get the same error here.

I add the full output of make in a file

.

Original issue reported on code.google.com by black.si...@gmail.com on 14 Feb 2012 at 8:02

Attachments:

GoogleCodeExporter commented 9 years ago
Try the following patch.

Index: src/stats.c
===================================================================
--- src/stats.c (revision 755)
+++ src/stats.c (working copy)
@@ -440,6 +440,7 @@
                                free_space_mb);
         dcc_set_nonblocking(acc_fd);
         ret = read(acc_fd, challenge, 1024); /* empty the receive queue */
+        if (ret < 0) rs_log_info("read on acc_fd failed");
         dcc_writex(acc_fd, reply, reply_len);
     }

Original comment by fergus.h...@gmail.com on 15 Feb 2012 at 6:25

GoogleCodeExporter commented 9 years ago
I've gone ahead and committed the patch.  Fixed in revision 758.

Original comment by fergus.h...@gmail.com on 4 Apr 2012 at 7:02