diff options
author | Qian Jianhua <qianjh@cn.fujitsu.com> | 2022-03-18 17:37:28 +0800 |
---|---|---|
committer | Qian Jianhua <qianjh@cn.fujitsu.com> | 2022-03-21 18:15:46 +0800 |
commit | 2d810acbd2c0fb73939e5a38b68b22152a4f3cc9 (patch) | |
tree | c2f389e567962049f76631844bc5b18baf416b56 | |
parent | e63ac860afe816fef6b86bee6e47980e1351213c (diff) | |
download | gcc-2d810acbd2c0fb73939e5a38b68b22152a4f3cc9.zip gcc-2d810acbd2c0fb73939e5a38b68b22152a4f3cc9.tar.gz gcc-2d810acbd2c0fb73939e5a38b68b22152a4f3cc9.tar.bz2 |
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
-rw-r--r-- | gcc/c-family/c-ada-spec.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-ada-spec.cc b/gcc/c-family/c-ada-spec.cc index 149d336..aeb4291 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. */ |