Mercurial > gnulib
changeset 39431:3bebd5a58f4c
canon-host.c: avoid spurious GCC 9 warning
* lib/canon-host.c: Suppress GCC9's -Wsuggest-attribute=malloc.
author | Jim Meyering <meyering@fb.com> |
---|---|
date | Sun, 24 Jun 2018 11:51:48 -0700 |
parents | da572132b0b8 |
children | 2a937a2a481b |
files | ChangeLog lib/canon-host.c |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <meyering@fb.com> + 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.
--- 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 <https://www.gnu.org/licenses/>. */ +/* 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 <config.h> #include "canon-host.h"