> Date: Mon, 28 Mar 2011 12:40:28 +0300
> From: Tiago Vignatti <[email protected]>
> 
> Hi,
> 
> On 03/25/2011 04:42 PM, ext Mark Kettenis wrote:
> >> From: Tiago Vignatti<[email protected]>
> >> Date: Fri, 25 Mar 2011 16:31:41 +0200
> >
> > Sorry, but what gives you the authority to say this debug code isn't useful?
> 
> The code inside DEBUG is deliberately useless and the one in FONTDEBUG 
> could be simply changed by DebugF, but I think rarely a developer will 
> want to use it.
> 
> What are you suggesting then?

I guess what I mean is that somebody took the time to write that code,
so presumable it served a purpose.  It may very well be that that
purpose is no longer there.  But I'd expect that only somebody who
recently hacked on the font code can make that judgement.  At the very
least I think patches like this need more than just "remove unused
debug code" as an explanation/motivation.  In a sense, debug code by
definition is unused.

> >> Signed-off-by: Tiago Vignatti<[email protected]>
> >> ---
> >>   dix/dixfonts.c |   12 ------------
> >>   1 files changed, 0 insertions(+), 12 deletions(-)
> >>
> >> diff --git a/dix/dixfonts.c b/dix/dixfonts.c
> >> index d8f1529..316a8a5 100644
> >> --- a/dix/dixfonts.c
> >> +++ b/dix/dixfonts.c
> >> @@ -66,10 +66,6 @@ Equipment Corporation.
> >>   #include "dixfont.h"
> >>   #include "xace.h"
> >>
> >> -#ifdef DEBUG
> >> -#include  <stdio.h>
> >> -#endif
> >> -
> >>   #ifdef XF86BIGFONT
> >>   #include "xf86bigfontsrv.h"
> >>   #endif
> >> @@ -391,14 +387,6 @@ OpenFont(ClientPtr client, XID fid, Mask flags, 
> >> unsigned lenfname, char *pfontna
> >>       int         i;
> >>       FontPtr     cached = (FontPtr)0;
> >>
> >> -#ifdef FONTDEBUG
> >> -    char *f;
> >> -    f = malloc(lenfname + 1);
> >> -    memmove(f, pfontname, lenfname);
> >> -    f[lenfname] = '\0';
> >> -    ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f);
> >> -    free(f);
> >> -#endif
> >>       if (!lenfname || lenfname>  XLFDMAXFONTNAMELEN)
> >>    return BadName;
> >>       if (patternCache)
> >> --
> >> 1.7.0.4
> >>
> >> _______________________________________________
> >> [email protected]: X.Org development
> >> Archives: http://lists.x.org/archives/xorg-devel
> >> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> >>
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to