public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5196] jit: fix -Werror=format-overflow= in testsuite [PR103199] Date: Fri, 12 Nov 2021 13:21:12 +0000 (GMT) [thread overview] Message-ID: <20211112132112.7A5EF3858035@sourceware.org> (raw) https://gcc.gnu.org/g:aa1fd30df56d752e3d5a81af409875a1f1e3e327 commit r12-5196-gaa1fd30df56d752e3d5a81af409875a1f1e3e327 Author: David Malcolm <dmalcolm@redhat.com> Date: Thu Nov 11 18:32:21 2021 -0500 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> Diff: --- gcc/jit/docs/examples/tut04-toyvm/toyvm.c | 2 +- gcc/jit/docs/examples/tut04-toyvm/toyvm.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/jit/docs/examples/tut04-toyvm/toyvm.c b/gcc/jit/docs/examples/tut04-toyvm/toyvm.c index 8ea716e2d0a..63418f92d14 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); } diff --git a/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc b/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc index 7e9550159ad..81c8045af2c 100644 --- a/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc +++ b/gcc/jit/docs/examples/tut04-toyvm/toyvm.cc @@ -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); }
reply other threads:[~2021-11-12 13:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211112132112.7A5EF3858035@sourceware.org \ --to=dmalcolm@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).