From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7832) id F2B903858C83; Mon, 21 Mar 2022 10:16:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2B903858C83 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Qian Jianhua To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7735] Avoid a warning of overflow X-Act-Checkin: gcc X-Git-Author: Qian Jianhua X-Git-Refname: refs/heads/master X-Git-Oldrev: e63ac860afe816fef6b86bee6e47980e1351213c X-Git-Newrev: 2d810acbd2c0fb73939e5a38b68b22152a4f3cc9 Message-Id: <20220321101645.F2B903858C83@sourceware.org> Date: Mon, 21 Mar 2022 10:16:45 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2022 10:16:46 -0000 https://gcc.gnu.org/g:2d810acbd2c0fb73939e5a38b68b22152a4f3cc9 commit r12-7735-g2d810acbd2c0fb73939e5a38b68b22152a4f3cc9 Author: Qian Jianhua 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. */