[vlc-devel] commit: x11: fix compiler warnings. ( Rémi Duraffort )
Laurent Aimar
fenrir at via.ecp.fr
Tue Feb 3 16:28:22 CET 2009
Hi,
On Tue, Feb 03, 2009, Rémi Duraffort wrote:
> > > if( p_vout->p_sys->i_shm_opcode )
> > > {
> > > - int major, minor;
> > > + int minor;
> > > Bool pixmaps;
> > >
> > > XShmQueryVersion( p_vout->p_sys->p_display, &major, &minor,
> >
> > Expanding the scope of a variable without reason is seldom a good idea.
> I know, that why I have read the code and IMHO it doesn't change
> anything.
If someone has to read code to make sure it does not have side effects whereas
previously it was not needed, then the 'correction' is wrong.
Warning should be used to make the code clearer, not more obscure (in case of
pure cosmetics).
I dislike this warning of gcc, as it is rarely a real bug.
--
fenrir
More information about the vlc-devel
mailing list