Compress-Raw-Bzip2

 view release on metacpan or  search on metacpan

bzip2-src/bzip2.patch  view on Meta::CPAN

diff --git a/bzip2.c b/bzip2.c
index d95d280..7852cc4 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -1070,7 +1070,11 @@ void applySavedFileAttrToOutputFile ( IntNative fd )
    retVal = fchmod ( fd, fileMetaInfo.st_mode );
    ERROR_IF_NOT_ZERO ( retVal );
 
-   (void) fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
+#if __GNUC__
+   int unused __attribute__((unused));
+   unused = 
+#endif
+   fchown ( fd, fileMetaInfo.st_uid, fileMetaInfo.st_gid );
    /* chown() will in many cases return with EPERM, which can
       be safely ignored.
    */
diff --git a/bzip2recover.c b/bzip2recover.c
index a8131e0..0925048 100644
--- a/bzip2recover.c
+++ b/bzip2recover.c
@@ -153,7 +153,7 @@ typedef
 /*---------------------------------------------*/
 static BitStream* bsOpenReadStream ( FILE* stream )
 {
-   BitStream *bs = malloc ( sizeof(BitStream) );
+   BitStream *bs = (BitStream *) malloc ( sizeof(BitStream) );
    if (bs == NULL) mallocFail ( sizeof(BitStream) );
    bs->handle = stream;
    bs->buffer = 0;
@@ -166,7 +166,7 @@ static BitStream* bsOpenReadStream ( FILE* stream )
 /*---------------------------------------------*/
 static BitStream* bsOpenWriteStream ( FILE* stream )
 {
-   BitStream *bs = malloc ( sizeof(BitStream) );
+   BitStream *bs = (BitStream *) malloc ( sizeof(BitStream) );
    if (bs == NULL) mallocFail ( sizeof(BitStream) );
    bs->handle = stream;
    bs->buffer = 0;
diff --git a/bzlib.c b/bzlib.c
index 2178655..aaf1b40 100644
--- a/bzlib.c
+++ b/bzlib.c
@@ -165,7 +165,7 @@ int BZ_API(BZ2_bzCompressInit)
    if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc;
    if (strm->bzfree == NULL) strm->bzfree = default_bzfree;
 
-   s = BZALLOC( sizeof(EState) );
+   s = (EState*) BZALLOC( sizeof(EState) );
    if (s == NULL) return BZ_MEM_ERROR;
    s->strm = strm;
 
@@ -174,9 +174,9 @@ int BZ_API(BZ2_bzCompressInit)
    s->ftab = NULL;
 
    n       = 100000 * blockSize100k;
-   s->arr1 = BZALLOC( n                  * sizeof(UInt32) );
-   s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
-   s->ftab = BZALLOC( 65537              * sizeof(UInt32) );
+   s->arr1 = (UInt32*) BZALLOC( n                  * sizeof(UInt32) );
+   s->arr2 = (UInt32*) BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) );
+   s->ftab = (UInt32*) BZALLOC( 65537              * sizeof(UInt32) );
 
    if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) {
       if (s->arr1 != NULL) BZFREE(s->arr1);
@@ -362,7 +362,7 @@ Bool handle_compress ( bz_stream* strm )



( run in 2.634 seconds using v1.01-cache-2.11-cpan-d8267643d1d )