diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-09-09 19:39:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-09-09 19:39:36 +0000 |
commit | 922cbb7c7b88816b8b40d094a277482e8cf3032f (patch) | |
tree | f4b3a6e20b949f32330f28dfb4e50824e73bf2af | |
parent | 34144b6ec0548510df171956040f91a8742def29 (diff) | |
download | gcc-922cbb7c7b88816b8b40d094a277482e8cf3032f.zip gcc-922cbb7c7b88816b8b40d094a277482e8cf3032f.tar.gz gcc-922cbb7c7b88816b8b40d094a277482e8cf3032f.tar.bz2 |
compiler: increase buffer size to avoid -Wformat-length warning
GCC will soon get a new -Wformat-length option as described in
https://gcc.gnu.org/PR49905. This change makes a buffer larger to avoid
a warning.
Reviewed-on: https://go-review.googlesource.com/28915
Also revert ChangeLog entry in gcc/go/ChangeLog--changes to
gcc/go/gofrontend do not get ChangeLog entries.
From-SVN: r240054
-rw-r--r-- | gcc/go/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/go/gofrontend/MERGE | 2 | ||||
-rw-r--r-- | gcc/go/gofrontend/expressions.cc | 3 |
3 files changed, 2 insertions, 9 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index 8214ece..82c90d2 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -4,12 +4,6 @@ * Make-lang.in (GO_OBJS): Add go/go-sha1.o. (CFLAGS-go/go-sha1.o): New variable. -2016-09-01 Martin Sebor <msebor@redhat.com> - - * gofrontend/expressions.cc: Increase buffer size to guarantee - it fits the output of the formatted function regardless of its - arguments. - 2016-08-29 Ian Lance Taylor <iant@google.com> * lang.opt (fgo-c-header, fgo-compiling-runtime): New options. diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index af731f1..3b1f03a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -2022ddc85f812b6990b72c7e95b8207e07ac8984 +c2bd848dce774e8009ae1d8ee5d91ddc601ce37f The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/go/gofrontend/expressions.cc b/gcc/go/gofrontend/expressions.cc index 99f9f66..aabb353 100644 --- a/gcc/go/gofrontend/expressions.cc +++ b/gcc/go/gofrontend/expressions.cc @@ -9050,8 +9050,7 @@ Call_expression::do_flatten(Gogo* gogo, Named_object*, Location loc = this->location(); int i = 0; - /* Buffer large enough for INT_MAX plus the prefix. */ - char buf[14]; + char buf[20]; for (Typed_identifier_list::const_iterator p = results->begin(); p != results->end(); ++p, ++i) |