On Tue, Dec 13, 2016 at 02:31:51PM +0000, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/image-encoders.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/server/image-encoders.c b/server/image-encoders.c > index b23cdf0..a529968 100644 > --- a/server/image-encoders.c > +++ b/server/image-encoders.c > @@ -20,6 +20,7 @@ > #endif > > #include <glib.h> > +#include <common/log.h> > > #include "image-encoders.h" > #include "spice-bitmap-utils.h" > @@ -65,6 +66,23 @@ static void encoder_data_init(EncoderData *data); > static void encoder_data_reset(EncoderData *data); > static void image_encoders_release_glz(ImageEncoders *enc); > > +#if GLZ_DEBUG > +static void glz_dict_item_check(GlzDictItem *glz_item) > +{ > + spice_assert(glz_item != NULL); > + spice_assert(ring_item_is_linked(&glz_item->glz_context_link)); > + spice_assert(ring_item_is_linked(&glz_item->retention_link)); > + spice_assert(glz_item->enc != NULL); > + spice_assert(glz_item->red_drawable != NULL); > + if (ring_item_is_linked(&glz_item->free_link)) { > + spice_assert(glz_item->dict_image_context == NULL); > + } > +} > +#else > +static inline void glz_dict_item_check(G_GNUC_UNUSED GlzDictItem *glz_item) I don't think there's a good reason for the inline, gcc should be able to kill that function just fine. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel