[Spice-devel] [PATCH 7/9] common: add ring_get_length() for debugging purposes

Christophe Fergeau cfergeau at redhat.com
Wed Apr 27 07:05:06 PDT 2011


On Tue, Jan 25, 2011 at 02:33:34PM -0500, Marc-André Lureau wrote:
> Hi
> 
> > > +static inline unsigned int ring_get_length(Ring *ring)
> > 
> > This won't compile if no one uses it - so you probably want to make
> > it non static (or do a hack by doing (void)ring_get_length somewhere).
> 
> Correct, if you intend to do (gdb) call ring_get_length(ring). But I was using it in some temporary SPICE_DEBUG code.

Do you mean it should be #ifdef'ed? or that it's better to add the
equivalent of G_GNUC_UNUSED to the function definition to avoid the compiler
warning?

Thanks,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110427/7d65274a/attachment.pgp>


More information about the Spice-devel mailing list