summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/db/server.c3
-rw-r--r--src/analysis/routine.c41
-rw-r--r--src/arch/operands/immediate.c8
-rw-r--r--src/gui/editor.c2
4 files changed, 34 insertions, 20 deletions
diff --git a/src/analysis/db/server.c b/src/analysis/db/server.c
index 252fcb3..258a66c 100644
--- a/src/analysis/db/server.c
+++ b/src/analysis/db/server.c
@@ -548,7 +548,10 @@ GHubServer *g_hub_server_new_remote(const char *host, const char *port, bool ipv
}
else
+ {
assert(false);
+ ip = NULL;
+ }
if (ip == NULL)
{
diff --git a/src/analysis/routine.c b/src/analysis/routine.c
index 422e7de..99f1b28 100644
--- a/src/analysis/routine.c
+++ b/src/analysis/routine.c
@@ -868,25 +868,32 @@ char *g_binary_routine_to_string(const GBinRoutine *routine, bool include)
else if (routine->name != NULL)
name = routine->name;
- switch (routine->type)
- {
- case RTT_CONSTRUCTOR:
- result = stradd(result, name);
- result = stradd(result, routine->ns_sep);
- result = stradd(result, name);
- break;
+ else
+ name = NULL;
- case RTT_DESTRUCTOR:
- result = stradd(result, name);
- result = stradd(result, routine->ns_sep);
- result = stradd(result, "~");
- result = stradd(result, name);
- break;
+ if (name != NULL)
+ {
+ switch (routine->type)
+ {
+ case RTT_CONSTRUCTOR:
+ result = stradd(result, name);
+ result = stradd(result, routine->ns_sep);
+ result = stradd(result, name);
+ break;
+
+ case RTT_DESTRUCTOR:
+ result = stradd(result, name);
+ result = stradd(result, routine->ns_sep);
+ result = stradd(result, "~");
+ result = stradd(result, name);
+ break;
+
+ default: /* Pour gcc */
+ case RTT_CLASSIC:
+ result = stradd(result, name);
+ break;
- default: /* Pour gcc */
- case RTT_CLASSIC:
- result = stradd(result, name);
- break;
+ }
}
diff --git a/src/arch/operands/immediate.c b/src/arch/operands/immediate.c
index 746bcae..2a3ca0b 100644
--- a/src/arch/operands/immediate.c
+++ b/src/arch/operands/immediate.c
@@ -667,6 +667,8 @@ bool g_imm_operand_get_value(const GImmOperand *operand, MemoryDataSize size, ..
int32_t *sval32; /* Valeur sur 32 bits */
int64_t *sval64; /* Valeur sur 64 bits */
+ result = false;
+
extra = GET_IMM_OP_EXTRA(operand);
g_bit_lock(&extra->lock, HOLE_LOCK_BIT);
@@ -674,15 +676,13 @@ bool g_imm_operand_get_value(const GImmOperand *operand, MemoryDataSize size, ..
if (extra->size != size)
goto exit;
- result = true;
-
va_start(ap, size);
switch (size)
{
/* Pour GCC... */
case MDS_UNDEFINED:
- result = false;
+ goto exit;
break;
case MDS_4_BITS_UNSIGNED:
case MDS_8_BITS_UNSIGNED:
@@ -722,6 +722,8 @@ bool g_imm_operand_get_value(const GImmOperand *operand, MemoryDataSize size, ..
va_end(ap);
+ result = true;
+
exit:
g_bit_unlock(&extra->lock, HOLE_LOCK_BIT);
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 1d4190f..1a58b90 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -332,6 +332,8 @@ static void connect_all_editor_signals(GtkBuilder *builder, GObject *obj, const
{
if (g_module_supported())
module = g_module_open(NULL, G_MODULE_BIND_LAZY);
+ else
+ module = NULL;
if (module == NULL)
{