diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-11 08:33:18 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2018-09-20 07:44:31 +0200 |
| commit | 846d316efab8b8b654eee58b952cdf1ba2d3eb42 (patch) | |
| tree | 217e8f5b825ad11c224d016a6d54b9224337b5f6 /miasm2/core | |
| parent | 2f9139cbc737978d7308496bb8249a99431320e7 (diff) | |
| download | miasm-846d316efab8b8b654eee58b952cdf1ba2d3eb42.tar.gz miasm-846d316efab8b8b654eee58b952cdf1ba2d3eb42.zip | |
Code cleaning: lgtm.com
Diffstat (limited to 'miasm2/core')
| -rw-r--r-- | miasm2/core/asmblock.py | 1 | ||||
| -rw-r--r-- | miasm2/core/cpu.py | 2 | ||||
| -rw-r--r-- | miasm2/core/ctypesmngr.py | 3 | ||||
| -rw-r--r-- | miasm2/core/types.py | 3 |
4 files changed, 7 insertions, 2 deletions
diff --git a/miasm2/core/asmblock.py b/miasm2/core/asmblock.py index 2f336617..97113be1 100644 --- a/miasm2/core/asmblock.py +++ b/miasm2/core/asmblock.py @@ -169,7 +169,6 @@ class AsmBlock(object): def split(self, loc_db, offset): loc_key = loc_db.get_or_create_offset_location(offset) log_asmblock.debug('split at %x', offset) - i = -1 offsets = [x.offset for x in self.lines] offset = loc_db.get_location_offset(loc_key) if offset not in offsets: diff --git a/miasm2/core/cpu.py b/miasm2/core/cpu.py index 071991b7..813ac47d 100644 --- a/miasm2/core/cpu.py +++ b/miasm2/core/cpu.py @@ -684,7 +684,7 @@ class m_arg(object): self.expr = expr return start, stop - def asm_ast_to_expr(self, arg, loc_db): + def asm_ast_to_expr(self, arg, loc_db, **kwargs): raise NotImplementedError("Virtual") diff --git a/miasm2/core/ctypesmngr.py b/miasm2/core/ctypesmngr.py index ef14451f..5daf8950 100644 --- a/miasm2/core/ctypesmngr.py +++ b/miasm2/core/ctypesmngr.py @@ -36,6 +36,9 @@ class CTypeBase(object): def _typerepr(self): return self.__repr + def __eq__(self, other): + raise NotImplementedError("Abstract method") + def __ne__(self, other): return not self.__eq__(other) diff --git a/miasm2/core/types.py b/miasm2/core/types.py index e6ba1ccf..a60077ac 100644 --- a/miasm2/core/types.py +++ b/miasm2/core/types.py @@ -340,6 +340,9 @@ class Type(object): def __neq__(self, other): return not self == other + def __eq__(self, other): + raise NotImplementedError("Abstract method") + def __ne__(self, other): return not self.__eq__(other) |