[FFmpeg-devel] [PATCH] fix unused variable warning in faanidct.c

Diego Biurrun diego
Sat Mar 8 18:13:45 CET 2008


On Thu, Mar 06, 2008 at 01:15:03AM +0100, Michael Niedermayer wrote:
> On Thu, Mar 06, 2008 at 01:05:56AM +0100, Diego Biurrun wrote:
> > On Thu, Mar 06, 2008 at 12:00:05AM +0000, M?ns Rullg?rd wrote:
> > > Diego Biurrun <diego at biurrun.de> writes:
> > > 
> > > > On Wed, Mar 05, 2008 at 05:18:56PM +0100, Michael Niedermayer wrote:
> > > >> 
> > > >> On Wed, Mar 05, 2008 at 04:12:26PM +0100, Diego Biurrun wrote:
> > > >> > On Wed, Mar 05, 2008 at 10:22:04PM +1100, mark cox wrote:
> > > >> > > $subj
> > > >> > 
> > > >> > I have the following in my local tree since yesterday.  Michael, OK to
> > > >> > commit?
> > > >> 
> > > >> without the // and with a unused yes
> > > >
> > > > What's so bad about commenting out the variables?
> > > 
> > > What purpose does a commented out variable serve?
> > 
> > The same purpose that a block of '#if 0' code serves.  If you enable the
> > '#if 0' block again, you put the variable back...
> 
> No if you enable the '#if 0' block again, you get a compilation failure, if
> the variable has been commented out or removed.
> 
> At this point you have to start debuging why it failed ...

I would not call this "debugging".  You have to edit the code anyway to
enable the #if 0 block, enabling one more variable is not really hard or
much extra work.  Furthermore, if the block gets removed, the variable
is likely to stay behind.  And it only works with gcc.

But hey, if you prefer it that way, it shall be done that way...

Diego




More information about the ffmpeg-devel mailing list