aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2013-06-06 19:45:40 +0300
committerPekka Enberg <penberg@kernel.org>2013-06-06 19:45:40 +0300
commit30c066390616aec5a856b8857634e0dfad65c327 (patch)
tree1373b9b1b008a2341e3e36d75479c9cae58cab82
parentf4fecbc7ed3e0febdfe89ec1a14b1ce13d42750f (diff)
downloadjato-30c066390616aec5a856b8857634e0dfad65c327.tar.gz
jit: Fix initializer in do_convert_bb_to_ir()
Spotted by GCC: jit/bytecode-to-ir.c: In function ‘do_convert_bb_to_ir’: jit/bytecode-to-ir.c:200:9: warning: missing initializer [-Wmissing-field-initializers] jit/bytecode-to-ir.c:200:9: warning: (near initialization for ‘buffer.buffer’) [-Wmissing-field-initializers] Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--jit/bytecode-to-ir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/jit/bytecode-to-ir.c b/jit/bytecode-to-ir.c
index c055c0dd..bbb988d8 100644
--- a/jit/bytecode-to-ir.c
+++ b/jit/bytecode-to-ir.c
@@ -197,7 +197,7 @@ int convert_instruction(struct parse_context *ctx)
static int do_convert_bb_to_ir(struct basic_block *bb)
{
struct compilation_unit *cu = bb->b_parent;
- struct bytecode_buffer buffer = { };
+ struct bytecode_buffer buffer;
struct parse_context ctx = {
.buffer = &buffer,
.cu = cu,
@@ -207,8 +207,10 @@ static int do_convert_bb_to_ir(struct basic_block *bb)
};
int err = 0;
- buffer.buffer = cu->method->code_attribute.code;
- buffer.pos = bb->start;
+ buffer = (struct bytecode_buffer) {
+ .buffer = cu->method->code_attribute.code,
+ .pos = bb->start,
+ };
if (bb->is_eh && !bb_mimic_stack_is_resolved(bb)) {
stack_push(bb->mimic_stack, exception_ref_expr());