]> git.wh0rd.org - dump.git/blobdiff - dump/tape.c
Fix some compile warnings.
[dump.git] / dump / tape.c
index b44f9e04309405f96f0724111d49774eb23f84d5..116b4a3016e0f9d523f81769c4d0cfbaeca83cb2 100644 (file)
@@ -37,7 +37,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: tape.c,v 1.81 2004/03/01 10:52:53 stelian Exp $";
+       "$Id: tape.c,v 1.83 2004/04/21 09:15:08 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -573,8 +573,6 @@ close_rewind(void)
 {
        int eot_code = 1;
        (void)trewind();
-       if (nexttape || Mflag)
-               return;
        if (eot_script) {
                msg("Launching %s\n", eot_script);
                eot_code = system_command(eot_script, tape, tapeno);
@@ -585,6 +583,8 @@ close_rewind(void)
        }
        if (eot_code == 0)
                return;
+       if (nexttape || Mflag)
+               return;
        if (!nogripe) {
                msg("Change Volumes: Mount volume #%d\n", tapeno+1);
                broadcast("CHANGE DUMP VOLUMES!\7\7\n");
@@ -1087,9 +1087,6 @@ doslave(int cmd,
        int compresult;
        volatile int do_compress = !first;
        unsigned long worklen;
-#ifdef HAVE_BZLIB
-       unsigned int worklen2;
-#endif
 #ifdef HAVE_LZO
        lzo_align_t __LZO_MMODEL *LZO_WorkMem;
 #endif
@@ -1226,7 +1223,7 @@ doslave(int cmd,
 #endif /* HAVE_ZLIB */
 #ifdef HAVE_BZLIB
                        if (zipflag == COMPRESS_BZLIB) {
-                               worklen2 = worklen;
+                               unsigned int worklen2 = worklen;
                                compresult = BZ2_bzBuffToBuffCompress(
                                                       comp_buf->buf,
                                                       &worklen2,
@@ -1244,10 +1241,12 @@ doslave(int cmd,
 #endif /* HAVE_BZLIB */
 #ifdef HAVE_LZO
                        if (zipflag == COMPRESS_LZO) {
+                               lzo_uint worklen2 = worklen;
                                compresult = lzo1x_1_compress((char *)slp->tblock[0],writesize,
                                                               comp_buf->buf,
-                                                             (lzo_uintp)&worklen,
+                                                             &worklen2,
                                                               LZO_WorkMem);
+                               worklen = worklen2;
                                if (compresult == LZO_E_OK)
                                        compresult = 1;
                                else