qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] trace: inline control-internal.h into control.h


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] trace: inline control-internal.h into control.h
Date: Thu, 2 May 2013 16:47:29 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, May 02, 2013 at 04:25:20PM +0200, Lluís Vilanova wrote:
> Stefan Hajnoczi writes:
> 
> > trace/control.h is the API for manipulating trace events in QEMU.  Some
> > of the implementation of this API lives in trace/control-internal.h.
> 
> > Older versions of gcc complain because a static prototype is used but
> > the function is defined static inline later on:
> 
> >   CC    vl.o
> >   In file included from trace/control.h:191,
> >                    from vl.c:165:
> >                    trace/control.h:77:
> >   warning: ‘trace_event_count’ declared inline after being called
> >                    trace/control.h:77:
> >   warning: previous declaration of ‘trace_event_count’ was here
> 
> > The gcc version is:
> 
> >   gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
> 
> > The whole split into a public header and implementation header with
> > static inlines seems a bit much anyway.  If we want these functions to
> > be static inline let's pay the price and put them into the header file.
> 
> > Note that a few functions must be re-ordered so that they are declared
> > before use.
> 
> Wouldn't declaring them as "static inline" solve the compiler warning? Sorry,
> but I don't have such gcc version to try it.

I don't either but maybe Andreas can check.  I'm all for a smaller fix.

Stefan



reply via email to

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