From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXunJ-000829-Oc for qemu-devel@nongnu.org; Thu, 02 May 2013 10:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UXunE-0004ct-GQ for qemu-devel@nongnu.org; Thu, 02 May 2013 10:47:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UXunE-0004cd-9Q for qemu-devel@nongnu.org; Thu, 02 May 2013 10:47:32 -0400 Date: Thu, 2 May 2013 16:47:29 +0200 From: Stefan Hajnoczi Message-ID: <20130502144729.GB850@stefanha-thinkpad.redhat.com> References: <1367502325-25419-1-git-send-email-stefanha@redhat.com> <877gjhcvcf.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <877gjhcvcf.fsf@fimbulvetr.bsc.es> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] trace: inline control-internal.h into control.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Andreas Faerber On Thu, May 02, 2013 at 04:25:20PM +0200, Llu=C3=ADs Vilanova wrote: > Stefan Hajnoczi writes: >=20 > > trace/control.h is the API for manipulating trace events in QEMU. So= me > > of the implementation of this API lives in trace/control-internal.h. >=20 > > Older versions of gcc complain because a static prototype is used but > > the function is defined static inline later on: >=20 > > CC vl.o > > In file included from trace/control.h:191, > > from vl.c:165: > > trace/control.h:77: > > warning: =E2=80=98trace_event_count=E2=80=99 declared inline after = being called > > trace/control.h:77: > > warning: previous declaration of =E2=80=98trace_event_count=E2=80=99= was here >=20 > > The gcc version is: >=20 > > gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973] >=20 > > The whole split into a public header and implementation header with > > static inlines seems a bit much anyway. If we want these functions t= o > > be static inline let's pay the price and put them into the header fil= e. >=20 > > Note that a few functions must be re-ordered so that they are declare= d > > before use. >=20 > 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