From 1558bd267c6d0d5188bcb7fad2db342ba72a2b7c Mon Sep 17 00:00:00 2001 From: Cyrille Bagard Date: Sat, 29 Oct 2016 16:26:33 +0200 Subject: Read GCC warning messages with more care. --- ChangeLog | 5 +++++ src/arch/arm/v7/context.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f326cdd..4450196 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 16-10-29 Cyrille Bagard + * src/arch/arm/v7/context.c: + Read GCC warning messages with more care. + +16-10-29 Cyrille Bagard + * configure.ac: * src/analysis/disass/fetch.c: * src/arch/immediate.c: diff --git a/src/arch/arm/v7/context.c b/src/arch/arm/v7/context.c index 659fdd1..8206619 100644 --- a/src/arch/arm/v7/context.c +++ b/src/arch/arm/v7/context.c @@ -230,7 +230,18 @@ static void g_armv7_context_push_drop_point(GArmV7Context *ctx, DisassPriorityLe default: - marker = va_arg(ap, ArmV7InstrSet); + /** + * Les messages de GCC annoncent parfois les choses très clairement : + * + * context.c:233:33: warning: 'ArmV7InstrSet' is promoted to 'int' when passed through '...' + * marker = va_arg(ap, ArmV7InstrSet); + * ^ + * context.c:233:33: note: (so you should pass 'int' not 'ArmV7InstrSet' to 'va_arg') + * context.c:233:33: note: if this code is reached, the program will abort + * + */ + + marker = (ArmV7InstrSet)va_arg(ap, unsigned int); /** * Attention : toute adresse impaire est destinée à du mode Thumb. -- cgit v0.11.2-87-g4458