Ignazio Sgalmuzzo, le Mon 17 Feb 2014 22:21:30 +0000, a écrit : > libstore/do-bunzip2.c: added missing casts
Err, casts are usually a bad thing to introduce. Why not simply fixing the type of the inbuf and outbuf arrays? > --- > libstore/do-bunzip2.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libstore/do-bunzip2.c b/libstore/do-bunzip2.c > index 694da6f..310a837 100644 > --- a/libstore/do-bunzip2.c > +++ b/libstore/do-bunzip2.c > @@ -30,7 +30,7 @@ do_bunzip2 (void) > strm.opaque = NULL; > > strm.avail_in = 0; > - strm.next_out = outbuf; > + strm.next_out = (char*) outbuf; > strm.avail_out = OUTBUFSIZ; > > result = BZ2_bzDecompressInit (&strm, 0, SMALL_MODE); > @@ -39,7 +39,7 @@ do_bunzip2 (void) > { > if (strm.avail_in == 0) > { > - strm.next_in = inbuf; > + strm.next_in = (char*) inbuf; > strm.avail_in = (*unzip_read)(strm.next_in, INBUFSIZ); > > if (strm.avail_in == 0) > @@ -53,8 +53,8 @@ do_bunzip2 (void) > > if ((strm.avail_out == 0) || (result == BZ_STREAM_END)) > { > - (*unzip_write) (outbuf, OUTBUFSIZ - strm.avail_out); > - strm.next_out = outbuf; > + (*unzip_write) ((char*) outbuf, OUTBUFSIZ - strm.avail_out); > + strm.next_out = (char*) outbuf; > strm.avail_out = OUTBUFSIZ; > } > } > -- > 1.9.0.rc3 > > -- Samuel * x remarque qu'avec un peu de volonté, on peut faire du code de porc dans d'importe quel langage Turing-complet -+- x sur #ens-mim - codons porc -+-