diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/arm/instruction.c | 7 | ||||
-rw-r--r-- | plugins/arm/v7/processor.c | 5 | ||||
-rw-r--r-- | plugins/elf/symbols.c | 12 | ||||
-rw-r--r-- | plugins/pychrysalide/arch/immediate.c | 9 |
4 files changed, 29 insertions, 4 deletions
diff --git a/plugins/arm/instruction.c b/plugins/arm/instruction.c index 3a7af7f..ae9721a 100644 --- a/plugins/arm/instruction.c +++ b/plugins/arm/instruction.c @@ -24,6 +24,7 @@ #include "instruction.h" +#include <assert.h> #include <malloc.h> #include <string.h> @@ -242,6 +243,12 @@ bool g_arm_instruction_set_cond(GArmInstruction *instr, ArmCondCode cond) case ACC_LE: suffix = "le"; break; case ACC_AL: suffix = NULL; break; case ACC_NV: suffix = "nv"; break; + + default: /* Pour GCC... */ + assert(false); + suffix = NULL; + break; + } if (suffix != NULL) diff --git a/plugins/arm/v7/processor.c b/plugins/arm/v7/processor.c index 5bbe808..0203f32 100644 --- a/plugins/arm/v7/processor.c +++ b/plugins/arm/v7/processor.c @@ -281,8 +281,9 @@ static GArchInstruction *g_armv7_processor_disassemble(const GArmV7Processor *pr break; - default: - assert(0); + default: /* Pour GCC... */ + assert(false); + result = NULL; break; } diff --git a/plugins/elf/symbols.c b/plugins/elf/symbols.c index 315d003..8c40ae4 100644 --- a/plugins/elf/symbols.c +++ b/plugins/elf/symbols.c @@ -494,7 +494,11 @@ static bool do_elf_symbol_loading(GElfLoading *loading, GElfFormat *format, bool case STT_OBJECT: name = g_elf_loading_build_name(loading, index, virt, "obj_", alt_name, &addr); - if (name == NULL) break; + if (name == NULL) + { + symbol = NULL; + break; + } init_mrange(&range, &addr, ELF_SYM(format, sym, st_size)); @@ -515,7 +519,11 @@ static bool do_elf_symbol_loading(GElfLoading *loading, GElfFormat *format, bool /* Constitution d'une routine */ name = g_elf_loading_build_name(loading, index, virt, "func_", alt_name, &addr); - if (name == NULL) break; + if (name == NULL) + { + symbol = NULL; + break; + } routine = try_to_demangle_routine(name); symbol = G_BIN_SYMBOL(routine); diff --git a/plugins/pychrysalide/arch/immediate.c b/plugins/pychrysalide/arch/immediate.c index f1ec125..794571d 100644 --- a/plugins/pychrysalide/arch/immediate.c +++ b/plugins/pychrysalide/arch/immediate.c @@ -25,6 +25,7 @@ #include "immediate.h" +#include <assert.h> #include <pygobject.h> @@ -181,6 +182,14 @@ static PyObject *py_imm_operand_get_value(PyObject *self, void *closure) g_imm_operand_get_value(operand, size, &sval64); result = PyLong_FromLongLong(sval64); break; + + /* Pour GCC... */ + default: + assert(false); + result = Py_None; + Py_INCREF(result); + break; + } return result; |