qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] clang warnings too noisy


From: Paolo Bonzini
Subject: Re: [Qemu-devel] clang warnings too noisy
Date: Sat, 07 Mar 2015 12:14:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


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 via email to

[Prev in Thread] Current Thread [Next in Thread]