qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org, Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] trace: inline control-internal.h into control.h
Date: Thu, 2 May 2013 16:47:29 +0200	[thread overview]
Message-ID: <20130502144729.GB850@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <877gjhcvcf.fsf@fimbulvetr.bsc.es>

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	other threads:[~2013-05-02 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 13:45 [Qemu-devel] [PATCH] trace: inline control-internal.h into control.h Stefan Hajnoczi
2013-05-02 14:25 ` Lluís Vilanova
2013-05-02 14:47   ` Stefan Hajnoczi [this message]

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=20130502144729.GB850@stefanha-thinkpad.redhat.com \
    --to=stefanha@redhat.com \
    --cc=afaerber@suse.de \
    --cc=qemu-devel@nongnu.org \
    /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).