Re: [protocol 1/3] macros: Improve the SPICE_GNUC_DEPRECATED* macros

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

 



> 
> On Fri, 12 Aug 2016, Frediano Ziglio wrote:
> 
> > > 
> > > If the user specifically requests access to the deprecated APIs by
> > > defining the SPICE_DEPRECATED macro, then turn off the
> > > SPICE_GNUC_DEPRECATED* warnings.
> > > Also automatically use G_GNUC_DEPRECATED if available.
> > > Add SPICE_GNUC_DEPRECATED_FOR().
> > > 
> > 
> > I'm not really sure it's a good idea to disable deprecation
> > warnings. If a program does want to ignore warnings I will
> > just force to avoid -Werror and tolerate the warnings.
> 
> The deprecation warnings are only disabled if one defines
> SPICE_DEPRECATED, which is obviously not the case by default.
> 
> This is needed by spice-gtk so it can implement those deprecated APIs
> that other applications may want to use without getting warnings
> itself.
> 

in spice-core.h these lines:

#ifdef SPICE_SERVER_INTERNAL
#undef SPICE_GNUC_DEPRECATED
#define SPICE_GNUC_DEPRECATED
#endif

are used to do it.

> That said, an additional patch could potentially move the
> -DSPICE_DEPRECATED from Makefile.am to a #define SPICE_DEPRECATED in the
> relevant C files so it does not have as large a footprint.
> 

Frediano
_______________________________________________
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]