Re: [protocol] macros: Use GLib's G_DEPRECATED macro if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 9 Nov 2016, Christophe Fergeau wrote:
[...]
> I believe all of these were more or less directly imported from glib.
> Grepping around, I could only find SPICE_GNUC_VISIBLE, SPICE_GNUC_NORETURN,
> SPICE_GNUC_UNUSED, SPICE_GNUC_PRINTF and SPICE_GNUC_DEPRECATED being
> used. At this point, I'd just make sure the other ones emit a (compile
> time) warning when they are used unless some magic define is set, and
> drop them after a while.

I'm not sure how to do that:
 * If I'm not mistaken a #warning directive must be used alone on a 
   line but this is not how __attribute__ is used. Furthermore I doubt 
   #warning would even work if put inside a macro and putting it inside 
   the #ifdef would warn about the macro being defined, not about it 
   being used.

 * I could define the macro to something like 'define FOO to use this 
   macro' but this would generate a compilation error, not a compilation 
   warning.

-- 
Francois Gouget <fgouget@xxxxxxxxxxxxxxx>
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]