[Spice-devel] [PATCH] gtk: Remove redundant code
Christophe Fergeau
cfergeau at redhat.com
Tue May 10 08:01:17 PDT 2011
On Tue, May 10, 2011 at 05:02:52PM +0300, Zeeshan Ali (Khattak) wrote:
> --- a/gtk/coroutine_gthread.c
> +++ b/gtk/coroutine_gthread.c
> @@ -29,11 +29,7 @@ static GMutex *run_lock;
> static struct coroutine *current;
> static struct coroutine leader;
>
> -#if 0
> -#define CO_DEBUG(OP) fprintf(stderr, "%s %p %s %d\n", OP, g_thread_self(), __FUNCTION__, __LINE__)
> -#else
> #define CO_DEBUG(OP)
> -#endif
This #if 0 is here to be able to easily enable debugging output when
needed, I don't think it should be removed.
> diff --git a/gtk/decode-glz.c b/gtk/decode-glz.c
> index 5a3e06a..f1dde6e 100644
> --- a/gtk/decode-glz.c
> +++ b/gtk/decode-glz.c
> @@ -118,10 +118,6 @@ static void glz_decoder_window_add(SpiceGlzDecoderWindow *w,
> slot = img->hdr.id % w->nimages;
> }
>
> -#if 0
> - SPICE_DEBUG("%s: %d %" PRId64, __FUNCTION__, slot, img->hdr.id);
> -#endif
> -
I'd remove the #if 0 #endif and keep the SPICE_DEBUG unless it's printed
really quickly
> @@ -614,14 +612,6 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose)
> SpiceDisplay *display = SPICE_DISPLAY(widget);
> spice_display *d = SPICE_DISPLAY_GET_PRIVATE(display);
>
> -#if 0
> - SPICE_DEBUG("%s: area %dx%d at %d,%d", __FUNCTION__,
> - expose->area.width,
> - expose->area.height,
> - expose->area.x,
> - expose->area.y);
> -#endif
> -
Same here, maybe the debug should be kept but SPICE_DEBUG be silent?
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/20110510/c20f1993/attachment.pgp>
More information about the Spice-devel
mailing list