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