[distcc] distcc-2.10.1 on Solaris

Wayne Davison wayned at samba.org
Mon Aug 18 17:28:33 GMT 2003


On Mon, Aug 18, 2003 at 11:18:28AM +0200, Dimitri Papadopoulos-Orfanos wrote:
> distcc-2.10.1 builds just fine on Solaris 8 using Sun's Forte 7 
> compiler, except for a few warnings:

I've appended a patch that should fix all of these compiler warnings.

> It would be nice to fix at least the asprintf issue.

I'm wondering why you didn't get the same asprintf warning for arg.c?
It was using asprintf() without including snprintf.h, just like serve.c
was doing.

..wayne..
-------------- next part --------------
--- src/arg.c	13 Jul 2003 08:07:01 -0000	1.100
+++ src/arg.c	18 Aug 2003 17:23:07 -0000
@@ -87,6 +87,7 @@
 #include "io.h"
 #include "util.h"
 #include "exitcode.h"
+#include "snprintf.h"
 #include "filename.h"
 #include "arg.h"
 
--- src/compile.c	22 Jul 2003 07:24:06 -0000	1.17
+++ src/compile.c	18 Aug 2003 17:23:07 -0000
@@ -72,7 +72,7 @@
 {
     pid_t pid;
     int ret;
-    unsigned status;
+    int status;
 
     dcc_note_execution(dcc_hostdef_local, argv);
     dcc_note_state(STATE_COMPILE, input_name, "localhost");
--- src/compress.c	21 Jul 2003 04:40:48 -0000	1.18
+++ src/compress.c	18 Aug 2003 17:23:07 -0000
@@ -165,7 +165,7 @@
     }
 
     out_len = out_size;
-    lzo_ret = lzo1x_1_compress(in_buf, in_len, out_buf, &out_len, work_mem);
+    lzo_ret = lzo1x_1_compress((lzo_byte*)in_buf, in_len, (lzo_byte*)out_buf, &out_len, work_mem);
     if (lzo_ret != LZO_E_OK) {
         rs_log_error("LZO1X1 compression failed: %d", lzo_ret);
         free(out_buf);
@@ -267,7 +267,7 @@
     }
 
     out_len = out_size;
-    lzo_ret = lzo1x_decompress(in_buf, in_len, out_buf, &out_len, work_mem);
+    lzo_ret = lzo1x_decompress((lzo_byte*)in_buf, in_len, (lzo_byte*)out_buf, &out_len, work_mem);
     if (lzo_ret != LZO_E_OK) {
         rs_log_error("LZO1X1 decompression failed: %d", lzo_ret);
         ret = EXIT_IO_ERROR;
--- src/serve.c	25 Jul 2003 04:16:12 -0000	1.116
+++ src/serve.c	18 Aug 2003 17:23:07 -0000
@@ -76,6 +76,7 @@
 #include "util.h"
 #include "rpc.h"
 #include "exitcode.h"
+#include "snprintf.h"
 #include "dopt.h"
 #include "tempfile.h"
 #include "bulk.h"
@@ -250,7 +251,7 @@
                        int out_fd)
 {
     char **argv;
-    unsigned status;
+    int status;
     char *temp_i, *temp_o, *err_fname, *out_fname;
     int ret, compile_ret;
     char *orig_input, *orig_output;


More information about the distcc mailing list