From: Jim Meyering Date: Sun, 24 Jun 2018 18:51:48 +0000 (-0700) Subject: canon-host.c: avoid spurious GCC 9 warning X-Git-Tag: v1.0~5549 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=decdd868ba0d3d2294dd077a2484c758382ca7d7;p=gnulib.git canon-host.c: avoid spurious GCC 9 warning * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc. --- diff --git a/ChangeLog b/ChangeLog index 232f732ed8..1a7110935c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2018-06-24 Jim Meyering + canon-host.c: avoid spurious GCC 9 warning + * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc. + manywarnings: accommodate GCC 9.0-pre: remove -Wchkp and -Wabi * build-aux/gcc-warning.spec: Add them here, each with an explanation. * m4/manywarnings.m4: Remove them. diff --git a/lib/canon-host.c b/lib/canon-host.c index f2a16a7584..64afe1a0a1 100644 --- a/lib/canon-host.c +++ b/lib/canon-host.c @@ -17,6 +17,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +/* Without this pragma, gcc version 9.0.0 20180616 suggests that + the canon_* functions might be candidateifor attribute 'malloc' */ +#if 9 <= __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=malloc" +#endif + #include #include "canon-host.h"