aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-02-03 17:30:16 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-02-03 17:30:16 +0100
commit524fa29a934e4974736e36d6a40225b5ed8e2b17 (patch)
tree2c761bb5487b14085262b2322820f1aa513dc4ca
parent2109fce41093ad38c94fafcf610957b5c38b0b4c (diff)
downloadbusybox-w32-524fa29a934e4974736e36d6a40225b5ed8e2b17.tar.gz
busybox-w32-524fa29a934e4974736e36d6a40225b5ed8e2b17.tar.bz2
busybox-w32-524fa29a934e4974736e36d6a40225b5ed8e2b17.zip
bzip2: eliminate write-only local numQSorted
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/libarchive/bz/blocksort.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/archival/libarchive/bz/blocksort.c b/archival/libarchive/bz/blocksort.c
index a95d1f54d..3fe74f71c 100644
--- a/archival/libarchive/bz/blocksort.c
+++ b/archival/libarchive/bz/blocksort.c
@@ -730,7 +730,6 @@ void mainSort(EState* state,
730 int32_t* budget) 730 int32_t* budget)
731{ 731{
732 int32_t i, j; 732 int32_t i, j;
733 int32_t numQSorted;
734 Bool bigDone[256]; 733 Bool bigDone[256];
735 /* bbox: moved to EState to save stack 734 /* bbox: moved to EState to save stack
736 int32_t runningOrder[256]; 735 int32_t runningOrder[256];
@@ -853,8 +852,6 @@ void mainSort(EState* state,
853 * The main sorting loop. 852 * The main sorting loop.
854 */ 853 */
855 854
856 numQSorted = 0;
857
858 for (i = 0; /*i <= 255*/; i++) { 855 for (i = 0; /*i <= 255*/; i++) {
859 int32_t ss; 856 int32_t ss;
860 857
@@ -887,7 +884,6 @@ void mainSort(EState* state,
887 lo, hi, BZ_N_RADIX, budget 884 lo, hi, BZ_N_RADIX, budget
888 ); 885 );
889 if (*budget < 0) return; 886 if (*budget < 0) return;
890 numQSorted += (hi - lo + 1);
891 } 887 }
892 } 888 }
893 ftab[sb] |= SETMASK; 889 ftab[sb] |= SETMASK;
@@ -940,6 +936,9 @@ void mainSort(EState* state,
940 for (j = 0; j <= 255; j++) 936 for (j = 0; j <= 255; j++)
941 ftab[(j << 8) + ss] |= SETMASK; 937 ftab[(j << 8) + ss] |= SETMASK;
942 938
939 if (i == 255)
940 break;
941
943 /* 942 /*
944 * Step 3: 943 * Step 3:
945 * The [ss] big bucket is now done. Record this fact, 944 * The [ss] big bucket is now done. Record this fact,
@@ -981,9 +980,6 @@ void mainSort(EState* state,
981 */ 980 */
982 bigDone[ss] = True; 981 bigDone[ss] = True;
983 982
984 if (i == 255)
985 break;
986
987 { 983 {
988 int32_t bbStart = ftab[ss << 8] & CLEARMASK; 984 int32_t bbStart = ftab[ss << 8] & CLEARMASK;
989 int32_t bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart; 985 int32_t bbSize = (ftab[(ss+1) << 8] & CLEARMASK) - bbStart;