public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jan-Benedict Glaw <jbglaw@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-1169] Fix sprintf length warning Date: Wed, 24 May 2023 14:36:30 +0000 (GMT) [thread overview] Message-ID: <20230524143630.22B673858CDB@sourceware.org> (raw) https://gcc.gnu.org/g:fc0553d61e110a293d52405672cfe9919d7ecc12 commit r14-1169-gfc0553d61e110a293d52405672cfe9919d7ecc12 Author: Jan-Benedict Glaw <jbglaw@lug-owl.de> Date: Wed May 24 16:35:22 2023 +0200 Fix sprintf length warning One of the supplied argument strings is unneccesarily long (c-sky, using basically the same code, fixed it to a shorter length) and this fixes overflow warnings, as GCC fails to deduce that the full 256 bytes for load_op[] are not used at all. gcc/ChangeLog: * config/mcore/mcore.cc (output_inline_const) Make buffer smaller to silence overflow warnings later on. Diff: --- gcc/config/mcore/mcore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/mcore/mcore.cc b/gcc/config/mcore/mcore.cc index 92e7f960f75..e933b03cdff 100644 --- a/gcc/config/mcore/mcore.cc +++ b/gcc/config/mcore/mcore.cc @@ -1182,7 +1182,7 @@ output_inline_const (machine_mode mode, rtx operands[]) int trick_no; rtx out_operands[3]; char buf[256]; - char load_op[256]; + char load_op[128]; const char *dst_fmt; HOST_WIDE_INT value;
reply other threads:[~2023-05-24 14:36 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=20230524143630.22B673858CDB@sourceware.org \ --to=jbglaw@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).