From 1e1c54f77253e7f783df0047a421b3f4d26929cb Mon Sep 17 00:00:00 2001 From: Bo Yang Date: Mon, 25 Sep 2017 11:35:57 -0700 Subject: Change parameter type from enum opcode to int. If the compiler elects to represent enum E as a char rather than an int (per 6.7.2.2p4), the call to va_start() will have undefined behavior. --- upb/pb/compile_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'upb/pb/compile_decoder.c') diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index d86f840..d147edf 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -267,7 +267,7 @@ static void put32(compiler *c, uint32_t v) { *c->pc++ = v; } -static void putop(compiler *c, opcode op, ...) { +static void putop(compiler *c, int op, ...) { va_list ap; va_start(ap, op); -- cgit v1.2.3