From 1271d653c7691047284a1de99d209972e3cee6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Mon, 9 Mar 2020 07:12:48 +0100 Subject: [PATCH] Remove some unused members (#16164) --- libr/anal/p/anal_java.c | 8 +------- libr/core/cmd_anal.c | 3 --- libr/include/r_anal.h | 10 ++-------- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/libr/anal/p/anal_java.c b/libr/anal/p/anal_java.c index 4c94546e981c2..1341af6187d4a 100644 --- a/libr/anal/p/anal_java.c +++ b/libr/anal/p/anal_java.c @@ -55,7 +55,6 @@ static int java_switch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, ut32 default_loc = (ut32) (UINT (data, pos)), cur_case = 0; op->switch_op = r_anal_switch_op_new (addr, min_val, max_val, default_loc); - RAnalCaseOp *caseop = NULL; pos += 12; if (max_val > min_val && ((max_val - min_val)<(UT16_MAX/4))) { //caseop = r_anal_switch_op_add_case(op->switch_op, addr+default_loc, -1, addr+offset); @@ -66,12 +65,7 @@ static int java_switch_op(RAnal *anal, RAnalOp *op, ut64 addr, const ut8 *data, break; } int offset = (int)(ut32)(R_BIN_JAVA_UINT (data, pos)); - caseop = r_anal_switch_op_add_case (op->switch_op, - addr + pos, cur_case + min_val, addr + offset); - if (caseop) { - caseop->bb_ref_to = addr+offset; - caseop->bb_ref_from = addr; // TODO figure this one out - } + r_anal_switch_op_add_case (op->switch_op, addr + pos, cur_case + min_val, addr + offset); } } else { eprintf ("Invalid switch boundaries at 0x%"PFMT64x"\n", addr); diff --git a/libr/core/cmd_anal.c b/libr/core/cmd_anal.c index ffe516f25dd78..0d680b9e3656e 100644 --- a/libr/core/cmd_anal.c +++ b/libr/core/cmd_anal.c @@ -2189,9 +2189,6 @@ static bool anal_fcn_list_bb(RCore *core, const char *input, bool one) { pj_kn (pj, "addr", case_op->addr); pj_kn (pj, "jump", case_op->jump); pj_kn (pj, "value", case_op->value); - pj_kn (pj, "cond", case_op->cond); - pj_kn (pj, "bb_ref_to", case_op->bb_ref_to); - pj_kn (pj, "bb_ref_from", case_op->bb_ref_from); pj_end (pj); } } diff --git a/libr/include/r_anal.h b/libr/include/r_anal.h index 632f48efc70fa..628c0696d4055 100644 --- a/libr/include/r_anal.h +++ b/libr/include/r_anal.h @@ -533,10 +533,6 @@ typedef struct r_anal_case_obj_t { ut64 addr; ut64 jump; ut64 value; - ut32 cond; // TODO: treat like a regular condition - ut64 bb_ref_to; - ut64 bb_ref_from; - RAnalBlock *jumpbb; } RAnalCaseOp; typedef struct r_anal_switch_obj_t { @@ -885,12 +881,10 @@ typedef struct r_anal_bb_t { RAnalDiff *diff; RAnalCond *cond; RAnalSwitchOp *switch_op; - // offsets of instructions in this block - ut16 *op_pos; - // size of the op_pos array + ut16 *op_pos; // offsets of instructions in this block, count is ninstr - 1 (first is always 0) ut8 *op_bytes; ut8 *parent_reg_arena; - int op_pos_size; + int op_pos_size; // size of the op_pos array int ninstr; int stackptr; int parent_stackptr;