From aa1fd30df56d752e3d5a81af409875a1f1e3e327 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 11 Nov 2021 18:32:21 -0500 Subject: jit: fix -Werror=format-overflow= in testsuite [PR103199] gcc/jit/ChangeLog: PR jit/103199 * docs/examples/tut04-toyvm/toyvm.c (toyvm_function_compile): Increase size of buffer. * docs/examples/tut04-toyvm/toyvm.cc (compilation_state::create_function): Likewise. Signed-off-by: David Malcolm --- gcc/jit/docs/examples/tut04-toyvm/toyvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/jit/docs/examples/tut04-toyvm/toyvm.c') diff --git a/gcc/jit/docs/examples/tut04-toyvm/toyvm.c b/gcc/jit/docs/examples/tut04-toyvm/toyvm.c index 8ea716e..63418f9 100644 --- a/gcc/jit/docs/examples/tut04-toyvm/toyvm.c +++ b/gcc/jit/docs/examples/tut04-toyvm/toyvm.c @@ -561,7 +561,7 @@ toyvm_function_compile (toyvm_function *fn) /* Create a block per operation. */ for (pc = 0; pc < fn->fn_num_ops; pc++) { - char buf[16]; + char buf[100]; sprintf (buf, "instr%i", pc); state.op_blocks[pc] = gcc_jit_function_new_block (state.fn, buf); } -- cgit v1.1