public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Qian Jianhua <qianjh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-7735] Avoid a warning of overflow
Date: Mon, 21 Mar 2022 10:16:45 +0000 (GMT)	[thread overview]
Message-ID: <20220321101645.F2B903858C83@sourceware.org> (raw)

https://gcc.gnu.org/g:2d810acbd2c0fb73939e5a38b68b22152a4f3cc9

commit r12-7735-g2d810acbd2c0fb73939e5a38b68b22152a4f3cc9
Author: Qian Jianhua <qianjh@cn.fujitsu.com>
Date:   Fri Mar 18 17:37:28 2022 +0800

    Avoid a warning of overflow
    
    This patch avoid a warning of "c-ada-spec.cc:1660:34: warning:
    'sprintf' may write a terminating nul past the end of the
    destination [-Wformat-overflow=]" when build GCC.
    
    gcc/c-family/ChangeLog:
    
            * c-ada-spec.cc: Change array length

Diff:
---
 gcc/c-family/c-ada-spec.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/c-family/c-ada-spec.cc b/gcc/c-family/c-ada-spec.cc
index 149d336ee96..aeb429136b6 100644
--- a/gcc/c-family/c-ada-spec.cc
+++ b/gcc/c-family/c-ada-spec.cc
@@ -1579,7 +1579,7 @@ dump_ada_function_declaration (pretty_printer *buffer, tree func,
   tree type = TREE_TYPE (func);
   tree arg = TYPE_ARG_TYPES (type);
   tree t;
-  char buf[17];
+  char buf[18];
   int num, num_args = 0, have_args = true, have_ellipsis = false;
 
   /* Compute number of arguments.  */


                 reply	other threads:[~2022-03-21 10:16 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=20220321101645.F2B903858C83@sourceware.org \
    --to=qianjh@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: link
Be 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).