diff options
Diffstat (limited to 'depends/pack200/src')
-rw-r--r-- | depends/pack200/src/bands.cpp | 2 | ||||
-rw-r--r-- | depends/pack200/src/bytes.h | 2 | ||||
-rw-r--r-- | depends/pack200/src/coding.cpp | 1 | ||||
-rw-r--r-- | depends/pack200/src/unpack.cpp | 17 | ||||
-rw-r--r-- | depends/pack200/src/unpack200.cpp | 2 |
5 files changed, 3 insertions, 21 deletions
diff --git a/depends/pack200/src/bands.cpp b/depends/pack200/src/bands.cpp index 1c10b35b..1608d838 100644 --- a/depends/pack200/src/bands.cpp +++ b/depends/pack200/src/bands.cpp @@ -79,7 +79,6 @@ void band::readData(int expectedLength) // Read one value to see what it might be. int XB = _meta_default; - int cp1 = 0, cp2 = 0; if (!is_BYTE1) { // must be a variable-length coding @@ -109,7 +108,6 @@ void band::readData(int expectedLength) { // Skip over the escape value. u->rp = xvs.rp; - cp1 = 1; } else { diff --git a/depends/pack200/src/bytes.h b/depends/pack200/src/bytes.h index 2e4a9daf..6ed0b729 100644 --- a/depends/pack200/src/bytes.h +++ b/depends/pack200/src/bytes.h @@ -87,7 +87,7 @@ struct bytes bytes res; res.ptr = ptr + beg; res.len = end - beg; - assert(res.len == 0 || inBounds(res.ptr) && inBounds(res.limit() - 1)); + assert(res.len == 0 ||(inBounds(res.ptr) && inBounds(res.limit() - 1))); return res; } // building C strings inside byte buffers: diff --git a/depends/pack200/src/coding.cpp b/depends/pack200/src/coding.cpp index 226ba458..3e311131 100644 --- a/depends/pack200/src/coding.cpp +++ b/depends/pack200/src/coding.cpp @@ -121,7 +121,6 @@ coding *coding::init() this->min = this->umin = 0; if (S != 0 && range != 0) { - int Smask = (1 << S) - 1; int64_t maxPosCode = range - 1; int64_t maxNegCode = range - 1; while (IS_NEG_CODE(S, maxPosCode)) diff --git a/depends/pack200/src/unpack.cpp b/depends/pack200/src/unpack.cpp index b286269d..55d253b2 100644 --- a/depends/pack200/src/unpack.cpp +++ b/depends/pack200/src/unpack.cpp @@ -483,10 +483,6 @@ void unpacker::putu1ref(entry *e) putu1_at(put_space(1), oidx); } -static int total_cp_size[] = {0, 0}; -static int largest_cp_ref[] = {0, 0}; -static int hash_probes[] = {0, 0}; - // Allocation of small and large blocks. enum @@ -705,7 +701,7 @@ void unpacker::read_file_header() unpack_abort("impossible archive size"); // bad input data return; } - if (archive_size < header_size_1) + if (archive_size < (size_t)header_size_1) { unpack_abort("too much read-ahead"); // somehow we pre-fetched too much? return; @@ -1316,8 +1312,6 @@ void unpacker::read_signature_values(entry *cpMap, int len) // Cf. PackageReader.readConstantPool void unpacker::read_cp() { - byte *rp0 = rp; - int i; for (int k = 0; k < (int)N_TAGS_IN_ORDER; k++) @@ -1596,7 +1590,6 @@ band **unpacker::attr_definitions::buildBands(unpacker::layout_definition *lo) const char *unpacker::attr_definitions::parseIntLayout(const char *lp, band *&res, byte le_kind, bool can_be_signed) { - const char *lp0 = lp; band *b = U_NEW(band, 1); char le = *lp++; int spec = UNSIGNED5_spec; @@ -1638,7 +1631,6 @@ const char *unpacker::attr_definitions::parseIntLayout(const char *lp, band *&re const char *unpacker::attr_definitions::parseNumeral(const char *lp, int &res) { - const char *lp0 = lp; bool sgn = false; if (*lp == '0') { @@ -1703,7 +1695,6 @@ band **unpacker::attr_definitions::popBody(int bs_base) const char *unpacker::attr_definitions::parseLayout(const char *lp, band **&res, int curCble) { - const char *lp0 = lp; int bs_base = band_stack.length(); bool top_level = (bs_base == 0); band *b; @@ -3135,8 +3126,6 @@ unpacker::read_bcs() void unpacker::read_bands() { - byte *rp0 = rp; - read_file_header(); if (cp.nentries == 0) @@ -3312,7 +3301,7 @@ void constant_pool::initMemberIndexes() // Get the pre-existing indexes: int nclasses = tag_count[CONSTANT_Class]; - entry *classes = tag_base[CONSTANT_Class] + entries; + // entry *classes = tag_base[CONSTANT_Class] + entries; // UNUSED int nfields = tag_count[CONSTANT_Fieldref]; entry *fields = tag_base[CONSTANT_Fieldref] + entries; int nmethods = tag_count[CONSTANT_Methodref]; @@ -3563,8 +3552,6 @@ void unpacker::start(void *packptr, size_t len) void unpacker::check_options() { - const char *strue = "true"; - const char *sfalse = "false"; if (deflate_hint_or_zero != 0) { bool force_deflate_hint = (deflate_hint_or_zero > 0); diff --git a/depends/pack200/src/unpack200.cpp b/depends/pack200/src/unpack200.cpp index 2ff8c34a..0a9d2714 100644 --- a/depends/pack200/src/unpack200.cpp +++ b/depends/pack200/src/unpack200.cpp @@ -97,8 +97,6 @@ static int read_magic(unpacker *u, char peek[], int peeklen) void unpack_200(std::string input_path, std::string output_path) { unpacker u; - int status = 0; - FILE *input = fopen(input_path.c_str(), "rb"); if (!input) { |