summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-04-02 14:43:47 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-04-02 14:43:47 (GMT)
commitf9404bf68a067b06986cd85855c43795ec578dbd (patch)
tree57f481aced2c69ddf6ac9766f310be86ebe03f6f /src/arch
parentd69503d7aeceddc52dfee9481e6a0e8ba9c1fc85 (diff)
Removed lots of uninitialized uses, mostly in NDEBUG mode.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/post.c1
-rw-r--r--src/arch/raw.c6
-rw-r--r--src/arch/undefined.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/post.c b/src/arch/post.c
index f3d1fd6..6462984 100644
--- a/src/arch/post.c
+++ b/src/arch/post.c
@@ -105,6 +105,7 @@ void post_process_target_resolution(GArchInstruction *instr, GArchProcessor *pro
default:
assert(false);
+ symbol = NULL;
break;
}
diff --git a/src/arch/raw.c b/src/arch/raw.c
index e85d865..683d60f 100644
--- a/src/arch/raw.c
+++ b/src/arch/raw.c
@@ -506,7 +506,9 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
GArchOperand *op; /* Opérande à manipuler */
GImmOperand *imm; /* Version opérande de valeur */
char byte; /* Octet à afficher (ou pas) */
+#ifndef NDEBUG
bool status; /* Bilan d'une récupération */
+#endif
base = G_ARCH_INSTRUCTION(instr);
@@ -566,8 +568,12 @@ static void g_raw_instruction_print(GRawInstruction *instr, GBufferLine *line, s
if (!instr->is_string && g_imm_operand_get_display(imm) != IOD_CHAR)
goto grip_fallback;
+#ifndef NDEBUG
status = g_imm_operand_get_value(imm, MDS_8_BITS, &byte);
assert(status);
+#else
+ g_imm_operand_get_value(imm, MDS_8_BITS, &byte);
+#endif
/* Si le caractère doit apparaître en hexadécimal... */
diff --git a/src/arch/undefined.c b/src/arch/undefined.c
index 3c76a09..0ae95d3 100644
--- a/src/arch/undefined.c
+++ b/src/arch/undefined.c
@@ -251,6 +251,7 @@ const char *g_undef_instruction_get_keyword(const GUndefInstruction *instr, AsmS
default:
assert(false);
+ result = NULL;
break;
}