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 <dmalcolm@redhat.com>
This commit is contained in:
parent
1b62cddcf0
commit
aa1fd30df5
@ -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);
|
||||
}
|
||||
|
@ -633,7 +633,7 @@ compilation_state::create_function (const char *funcname)
|
||||
/* Create a block per operation. */
|
||||
for (int pc = 0; pc < toyvmfn.fn_num_ops; pc++)
|
||||
{
|
||||
char buf[16];
|
||||
char buf[100];
|
||||
sprintf (buf, "instr%i", pc);
|
||||
op_blocks[pc] = fn.new_block (buf);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user