diff options
| author | Camille Mougey <camille.mougey@cea.fr> | 2015-02-16 16:40:19 +0100 |
|---|---|---|
| committer | Camille Mougey <camille.mougey@cea.fr> | 2015-02-16 16:40:19 +0100 |
| commit | 0fcd954e10351f914b37a96d498aec39feb30b24 (patch) | |
| tree | c1f68a979bfac603a3beccea678d4b8cfe3391dc | |
| parent | f6ba0b1b608a060ef5040d9937f6c7014383da6c (diff) | |
| download | miasm-0fcd954e10351f914b37a96d498aec39feb30b24.tar.gz miasm-0fcd954e10351f914b37a96d498aec39feb30b24.zip | |
PyLint: Unreachable code
| -rw-r--r-- | miasm2/arch/msp430/arch.py | 16 | ||||
| -rw-r--r-- | miasm2/arch/x86/arch.py | 1 | ||||
| -rw-r--r-- | miasm2/core/asmbloc.py | 2 | ||||
| -rw-r--r-- | miasm2/core/cpu.py | 2 |
4 files changed, 7 insertions, 14 deletions
diff --git a/miasm2/arch/msp430/arch.py b/miasm2/arch/msp430/arch.py index 02e3ca60..624ec19f 100644 --- a/miasm2/arch/msp430/arch.py +++ b/miasm2/arch/msp430/arch.py @@ -47,18 +47,13 @@ def deref_expr(s, l, t): t = t[0] assert(len(t) == 1) t = t[0] - if isinstance(t, ExprId): - return t - elif isinstance(t, ExprInt): - return t - elif isinstance(t, ExprMem): - return t - elif isinstance(t, ExprOp) and t.op == "autoinc": + if isinstance(t, ExprId) or \ + isinstance(t, ExprInt) or \ + isinstance(t, ExprMem) or \ + (isinstance(t, ExprOp) and t.op == "autoinc"): return t + raise NotImplementedError('not fully functional') - if t[-1] == '!': - return ExprOp('wback', *t[:-1]) - return t[0] def f_reg2expr(t): @@ -301,7 +296,6 @@ class mn_msp430(cls_mn): def getnextflow(self, symbol_pool): raise NotImplementedError('not fully functional') - return self.offset + 4 def addop(name, fields, args=None, alias=False): diff --git a/miasm2/arch/x86/arch.py b/miasm2/arch/x86/arch.py index b1d671d1..2e858756 100644 --- a/miasm2/arch/x86/arch.py +++ b/miasm2/arch/x86/arch.py @@ -915,7 +915,6 @@ class mn_x86(cls_mn): def getnextflow(self, symbol_pool): raise NotImplementedError('not fully functional') - return self.offset + 4 def ir_pre_instruction(self): return [ExprAff(mRIP[self.mode], diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py index ee93cba7..cb8423f6 100644 --- a/miasm2/core/asmbloc.py +++ b/miasm2/core/asmbloc.py @@ -219,7 +219,7 @@ class asm_bloc: l = self.lines[i] if l.splitflow() or l.breakflow(): raise NotImplementedError('not fully functional') - return l + def get_subcall_instr(self): if not self.lines: diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 85a6db75..ce6cf288 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -1564,7 +1564,7 @@ class cls_mn(object): if ((index, [xx[1].value for xx in to_decode]) in todo or (index, [xx[1].value for xx in to_decode]) in done): raise NotImplementedError('not fully functional') - continue + for p, f in to_decode: fnew = f.clone() o.append((p, fnew)) |