minaco2 / distcc

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

Compilation failure due to unused variable dotd.c. #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1.Version 3.2rc1

2.cc: 4.6.2
my pc: Linux kenobi 3.1.0-1-686-pae #1 SMP Tue Jan 10 05:42:54 UTC 2012 i686 
GNU/Linux, Debian testing

3. Error has occurred when I was trying to install distcc.

4.$ make
----8<------------------------------
src/dotd.c: In function ‘dcc_get_dotd_info’:
src/dotd.c:175:9: error: variable ‘ret’ set but not used [-      
Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

Original issue reported on code.google.com by kub...@gmail.com on 28 Jan 2012 at 12:51

GoogleCodeExporter commented 9 years ago
I think it could be a problem with a gcc.

Original comment by kub...@gmail.com on 28 Jan 2012 at 12:53

GoogleCodeExporter commented 9 years ago
Here's a patch.

Index: src/dotd.c
===================================================================
--- src/dotd.c  (revision 750)
+++ src/dotd.c  (working copy)
@@ -172,7 +172,6 @@
     char **new_args;  /* will throw this away */
     int has_dash_o = 0;
     char *env_var = 0;
-    int ret;
     int i;
     char *a;

@@ -253,7 +252,7 @@

         char *extension;
         char *tmp_dotd_fname;
-        ret = dcc_scan_args(argv, &input_file, &output_file, &new_args);
+        dcc_scan_args(argv, &input_file, &output_file, &new_args);
         /* if .o is set, just append .d.
          * otherwise, take the basename of the input, and set the suffix to .d */
         if (has_dash_o)

Original comment by fergus.h...@gmail.com on 2 Feb 2012 at 9:57

GoogleCodeExporter commented 9 years ago
I committed the patch into the svn repository: fixed in revision 754.

Original comment by fergus.h...@gmail.com on 6 Feb 2012 at 5:38