[Spice-devel] [spice-common 5/7] log: Kill spice_warn_if
Christophe Fergeau
cfergeau at redhat.com
Fri Nov 27 09:20:13 PST 2015
On Fri, Nov 27, 2015 at 11:13:29AM -0600, Jonathon Jongsma wrote:
> On Fri, 2015-11-27 at 16:47 +0100, Christophe Fergeau wrote:
> > It's redundant with spice_warn_if_fail(), and can even be confusing.
>
> Agreed. I assume you've checked to make sure nobody is actually using this?
Ah, did not mention, this needs to go with a spice-server patch to
change a dozen spice_warn_if occurrences.
>
>
> > ---
> > common/log.h | 8 +-------
> > 1 file changed, 1 insertion(+), 7 deletions(-)
> >
> > diff --git a/common/log.h b/common/log.h
> > index 6fecf66..2731582 100644
> > --- a/common/log.h
> > +++ b/common/log.h
> > @@ -95,13 +95,7 @@ void spice_log(const char *log_domain,
> > } \
> > } G_STMT_END
> >
> > -#define spice_warn_if(x) G_STMT_START { \
> > - if SPICE_UNLIKELY(x) { \
> > - spice_warning("condition `%s' reached", #x); \
> > - } \
> > -} G_STMT_END
> > -
> > -#define spice_assert(x) G_STMT_START { \
> > +#define spice_assert(x) G_STMT_START { \
>
> Any reason to change indentation here?
Should have been squashed in the s/SPICE_STMT_START/G_STMT_START patch,
not here, I'll change it.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20151127/51bce5fd/attachment.sig>
More information about the Spice-devel
mailing list