diff -ru cloop-2.01.orig/advancecomp-1.9_create_compressed_fs/advfs.cc cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc
--- cloop-2.01.orig/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-04-18 16:33:29.000000000 -0400
+++ cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-11-24 10:59:04.219672472 -0500
@@ -80,7 +80,7 @@
   {
    int z_error;
    unsigned long total=0;
-   unsigned len[maxalg];
+   uLong len[maxalg];
    unsigned int best;
    //memset(compressed,0,len); memset(uncompressed,0,blocksize);
    for(j=0; j<maxalg; j++) memset(compressed[j],0,maxlen), len[j]=maxlen;
@@ -110,7 +110,8 @@
       }
 
      /* Try 7ZIP compression now. */
-     if(!compress_zlib(shrink_extreme, (unsigned char *)compressed[maxalg-1], len[maxalg-1], (unsigned char *)uncompressed, blocksize))
+     unsigned zlib_length=(unsigned int)len[maxalg-1];
+     if(!compress_zlib(shrink_extreme, (unsigned char *)compressed[maxalg-1], zlib_length, (unsigned char *)uncompressed, blocksize))
       {
        fprintf(stderr, "*** Error %d compressing block %lu! (compressed=%p, len=%lu, uncompressed=%p, blocksize=%lu)\n", z_error, i, compressed,len,uncompressed,blocksize);
        goto error_free_cb_list;

