[Spice-devel] [PATCH] tests: fix compilation with -Wall -Werror

Christophe Fergeau cfergeau at gmail.com
Mon Mar 21 08:34:34 PDT 2011


On Mon, Mar 21, 2011 at 05:24:54PM +0200, Alon Levy wrote:
> 
> Well, this is test code, I would want to get back to this eventually, so
> could you turn this into a non static (and then the compiler won't complain)
> instead? if that doesn't work even #if 0 is better. (again, test code).
> 

Adding 'static void init_cursor() __attribute__((unused));' before the
function definition avoid the warning, but I don't know how (in)dependant
from GCC the code base should be? If that's too specific, I'll go with the
#if 0. I'm not a big fan of making this function non-static in case someone
uses this code as a base for something that is not a test and forget to
readd the missing 'static'

Thanks for the review,

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/20110321/c61b62c1/attachment.pgp>


More information about the Spice-devel mailing list