[FFmpeg-devel] [PATCH] remove disabled code part 1

Ramiro Polla ramiro.polla
Fri Sep 4 18:33:23 CEST 2009


On Fri, Sep 4, 2009 at 1:20 PM, Aurelien Jacobs<aurel at gnuage.org> wrote:
> On Fri, Sep 04, 2009 at 12:29:43PM -0300, Ramiro Polla wrote:
>> On Fri, Sep 4, 2009 at 10:13 AM, Diego Biurrun<diego at biurrun.de> wrote:
>> > On Fri, Sep 04, 2009 at 09:46:48AM -0300, Ramiro Polla wrote:
>> >> On Fri, Sep 4, 2009 at 9:08 AM, Diego Biurrun<diego at biurrun.de> wrote:
>> >> > On Tue, Sep 01, 2009 at 02:33:14PM +0200, Diego Biurrun wrote:
>> >> >> On Sat, Aug 29, 2009 at 12:30:17PM -0300, Ramiro Polla wrote:
>> >> >> > On Thu, Aug 27, 2009 at 7:25 AM, Diego Biurrun<diego at biurrun.de> wrote:
>> >> >> > > On Fri, Aug 07, 2009 at 11:15:19AM +0200, Diego Biurrun wrote:
>> >> >> > >> I started looking into disabled code, there is lots of it and probably
>> >> >> > >> mostly cruft.  Here is a patch that removes it, starting at the top
>> >> >> > >> level and the tests subdirectory.  More patches shall follow later.
>> >> >> > >>
>> >> >> > >> I will commit approved hunks only.
>> >> >> > >
>> >> >> > > libavdevice..
>> >> >> >
>> >> >> > > --- libavdevice/vfwcap.c  (revision 19725)
>> >> >> > > +++ libavdevice/vfwcap.c  (working copy)
>> >> >> > > @@ -294,18 +294,6 @@
>> >> >> > >
>> >> >> > > -#if 0
>> >> >> > > -    /* For testing yet unsupported compressions
>> >> >> > > -     * Copy these values from user-supplied verbose information */
>> >> >> > > -    bi->bmiHeader.biWidth       = 320;
>> >> >> > > -    bi->bmiHeader.biHeight      = 240;
>> >> >> > > -    bi->bmiHeader.biPlanes      = 1;
>> >> >> > > -    bi->bmiHeader.biBitCount    = 12;
>> >> >> > > -    bi->bmiHeader.biCompression = MKTAG('I','4','2','0');
>> >> >> > > -    bi->bmiHeader.biSizeImage   = 115200;
>> >> >> > > -    dump_bih(s, &bi->bmiHeader);
>> >> >> > > -#endif
>> >> >> >
>> >> >> > I prefer keeping this around.
>> >> >>
>> >> >> Maybe #ifdef DEBUG then?
>> >> >
>> >> > Or '#ifdef DEBUG_VFW' as in $attached..
>> >>
>> >> What's so bad about "#if 0"?
>> >
>> > It's a straight road into accumulating cruft.  Also, it will never get
>> > compiled and quickly fail to compile.  Just look at some of the code we
>> > have or had under '#if 0'...
>>
>> How will any of that be any different with "#if DEBUG_VFW"?
>
> I agree.
> If you don't want the debug code to rot, just use if(0){}.

Done, thanks for the tip.



More information about the ffmpeg-devel mailing list