# HG changeset patch # User Jim Meyering # Date 1529866308 25200 # Node ID 3bebd5a58f4c21487f5409c571f2a2d1ce4cf3f4 # Parent da572132b0b88155a0a1eb5c236741006d82915e canon-host.c: avoid spurious GCC 9 warning * lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc. diff -r da572132b0b8 -r 3bebd5a58f4c ChangeLog --- a/ChangeLog Sun Jun 24 11:31:50 2018 -0700 +++ b/ChangeLog Sun Jun 24 11:51:48 2018 -0700 @@ -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 -r da572132b0b8 -r 3bebd5a58f4c lib/canon-host.c --- a/lib/canon-host.c Sun Jun 24 11:31:50 2018 -0700 +++ b/lib/canon-host.c Sun Jun 24 11:51:48 2018 -0700 @@ -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"