qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] clang warnings too noisy
Date: Sat, 07 Mar 2015 12:14:32 +0100	[thread overview]
Message-ID: <54FADD98.8080509@redhat.com> (raw)
In-Reply-To: <CAFEAcA96NMuYLAht7nsv1Qd9Lfab5=KBA4A=kZs20Mk+y0a2hw@mail.gmail.com>



On 07/03/2015 00:47, Peter Maydell wrote:
> > 1. It complains about glib headers:
> > In file included from /home/stefanha/qemu/include/net/eth.h:32:
> > In file included from /home/stefanha/qemu/include/qemu/iov.h:17:
> > In file included from /home/stefanha/qemu/include/qemu-common.h:43:
> > In file included from /home/stefanha/qemu/include/glib-compat.h:19:
> > In file included from /usr/include/glib-2.0/glib.h:50:
> > In file included from /usr/include/glib-2.0/glib/ghash.h:33:
> > In file included from /usr/include/glib-2.0/glib/glist.h:32:
> > /usr/include/glib-2.0/glib/gmem.h:76:78: warning: unknown attribute
> > '__alloc_size__' ignored [-Wunknown-attributes]
> > gpointer g_malloc (gsize n_bytes) __attribute__((__malloc__))
> > __attribute__((__alloc_size__(1)));
> >                                                                              ^
> > /usr/include/glib-2.0/glib/gmem.h:78:79: warning: unknown attribute
> > '__alloc_size__' ignored [-Wunknown-attributes]
> 
> I think this is a glib bug...

If clang supports fewer attributes than GCC, the right course of action
is disabling the warning on clang.  There are very few attributes that
are used commonly and that affect ABI; most of them are just annotations.

Paolo

  reply	other threads:[~2015-03-07 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 19:06 [Qemu-devel] clang warnings too noisy Stefan Hajnoczi
2015-03-06 23:47 ` Peter Maydell
2015-03-07 11:14   ` Paolo Bonzini [this message]
2015-03-07 11:29     ` Stefan Weil
2015-03-10 10:35   ` Stefan Hajnoczi
2015-03-07  9:04 ` Stefan Weil
2015-03-07  9:50   ` Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54FADD98.8080509@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).