natInflater.cc (inflate): Cast `len' to unsigned.
* java/util/zip/natInflater.cc (inflate): Cast `len' to unsigned. Include <stdlib.h>. * java/util/zip/natDeflater.cc (deflate): Cast `len' to unsigned. Include <stdlib.h>. (update): Fail in default case. Always initialize `strat'. From-SVN: r27028
This commit is contained in:
parent
6bdb8141ec
commit
6ada3468d8
@ -1,5 +1,11 @@
|
||||
1999-05-19 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* java/util/zip/natInflater.cc (inflate): Cast `len' to unsigned.
|
||||
Include <stdlib.h>.
|
||||
* java/util/zip/natDeflater.cc (deflate): Cast `len' to unsigned.
|
||||
Include <stdlib.h>.
|
||||
(update): Fail in default case. Always initialize `strat'.
|
||||
|
||||
* mauve-libgcj: Enable java.util.zip.
|
||||
|
||||
1999-05-18 Warren Levy <warrenl@cygnus.com>
|
||||
|
@ -13,6 +13,7 @@ details. */
|
||||
#include <config.h>
|
||||
|
||||
#include <zlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cni.h>
|
||||
#include <jvm.h>
|
||||
@ -47,7 +48,7 @@ java::util::zip::Deflater::deflate (jbyteArray buf, jint off, jint len)
|
||||
{
|
||||
case Z_STREAM_END:
|
||||
is_finished = true;
|
||||
if (s->avail_out == len)
|
||||
if (s->avail_out == (unsigned int) len)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
@ -160,7 +161,7 @@ java::util::zip::Deflater::update ()
|
||||
JvSynchronize sync (this);
|
||||
z_streamp s = (z_streamp) zstream;
|
||||
|
||||
int strat;
|
||||
int strat = Z_DEFAULT_STRATEGY;
|
||||
switch (strategy)
|
||||
{
|
||||
case DEFAULT_STRATEGY:
|
||||
@ -172,6 +173,8 @@ java::util::zip::Deflater::update ()
|
||||
case HUFFMAN_ONLY:
|
||||
strat = Z_HUFFMAN_ONLY;
|
||||
break;
|
||||
default:
|
||||
JvFail ("unexpected strategy");
|
||||
}
|
||||
|
||||
// Ignore errors.
|
||||
|
@ -13,6 +13,7 @@ details. */
|
||||
#include <config.h>
|
||||
|
||||
#include <zlib.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <cni.h>
|
||||
#include <jvm.h>
|
||||
@ -104,7 +105,7 @@ java::util::zip::Inflater::inflate (jbyteArray buf, jint off, jint len)
|
||||
{
|
||||
case Z_STREAM_END:
|
||||
is_finished = true;
|
||||
if (s->avail_out == len)
|
||||
if (s->avail_out == (unsigned int) len)
|
||||
return -1;
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user