-Wall clean fixes with new gcc
authorJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 18:43:39 +0000 (14:43 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 18:43:39 +0000 (14:43 -0400)
Remove unused variables. Set a few uninitialized variables.

zgz/gzip/deflate.c
zgz/old-bzip2/blocksort.c
zgz/old-bzip2/bzlib.c

index 8f9bb06c38570ad0d895e0e6cefdf0b005e9b2d3..780e5009cd125efa9e6834d84b1c5ececf6eda16 100644 (file)
@@ -562,7 +562,7 @@ static void rsync_roll(unsigned start, unsigned num)
 static void deflate_fast(int pack_level, int rsync)
 {
     IPos hash_head; /* head of the hash chain */
-    int flush;      /* set if current block must be flushed, 2=>and padded  */
+    int flush = 0;      /* set if current block must be flushed, 2=>and padded  */
     unsigned match_length = 0;  /* length of best match */
 
     prev_length = MIN_MATCH-1;
index 85a02de5a70229bdd9a01a5013443588b806394d..94759aa8063daa0ce34328d8de496548db13b4ff 100644 (file)
@@ -751,8 +751,7 @@ void mainSort ( UInt32* ptr,
    Int32  copy[256];
    Bool   bigDone[256];
    UChar  c1;
-   Int32  numQSorted;
-   Int32  biggestSoFar;
+   Int32  numQSorted = 0;
    UInt16 s;
 
    if (verb >= 4) VPrintf0 ( "        main sort initialise ...\n" );
@@ -826,8 +825,6 @@ void mainSort ( UInt32* ptr,
       The main sorting loop.
    --*/
 
-   biggestSoFar = numQSorted = 0;
-
    for (i = 0; i <= 255; i++) {
 
       /*--
index d936078b6dc603bf2b3149fc5ae8dac82a432784..adee3aefe4c537972d18fdf0c6b62824497ec6c1 100644 (file)
@@ -761,7 +761,6 @@ BZFILE * bzopen_or_bzdopen
    BZFILE *bzfp         = NULL;
    int    verbosity     = 0;
    int    workFactor    = 30;
-   int    smallMode     = 0;
 
    if (mode == NULL) return NULL;
    while (*mode) {
@@ -771,7 +770,8 @@ BZFILE * bzopen_or_bzdopen
       case 'w':
          writing = 1; break;
       case 's':
-         smallMode = 1; break;
+         //smallMode = 1;
+        break;
       default:
          if (isdigit((int)(*mode))) {
             blockSize100k = *mode-'0';