summaryrefslogtreecommitdiff
path: root/src/arch/operands
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-10-20 21:44:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-10-20 21:44:30 (GMT)
commite8009661bc2a647678b944a09ee3a7e218692e44 (patch)
tree133934e85bf05314dadd8654ed0fb344cf5732d2 /src/arch/operands
parent43b19e1c8e902e6e96a5ca912497268a19255ac5 (diff)
Fixed some compilation warnings.
Diffstat (limited to 'src/arch/operands')
-rw-r--r--src/arch/operands/immediate.c8
1 files changed, 5 insertions, 3 deletions
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);