From: Philippe Mathieu-Daudé Date: Tue, 23 Feb 2021 11:12:53 +0000 (+0100) Subject: target/hexagon/opcodes: Add missing varargs cleanup X-Git-Tag: v6.0.0-rc0~56^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2526e69efd8e386573212bf3ea05171a727a598b;p=thirdparty%2Fqemu.git target/hexagon/opcodes: Add missing varargs cleanup Fix a trivial incorrect usage of variable argument macros detected by Coverity (missing_va_end: va_end was not called for ap). Fixes: Coverity CID 1446720 (VARARGS) Fixes: e3c00c2ed75 ("Hexagon (target/hexagon) opcode data structures") Signed-off-by: Philippe Mathieu-Daudé Tested-by: Taylor Simpson Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson Message-Id: <20210223111253.2831285-1-f4bug@amsat.org> Signed-off-by: Richard Henderson --- diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c index 4eef5fc40f6..35d790cdd5b 100644 --- a/target/hexagon/opcodes.c +++ b/target/hexagon/opcodes.c @@ -82,6 +82,7 @@ static void init_attribs(int tag, ...) while ((attr = va_arg(ap, int)) != 0) { set_bit(attr, opcode_attribs[tag]); } + va_end(ap); } const OpcodeEncoding opcode_encodings[] = {