[MPlayer-dev-eng] [PATCH] remove a bunch of const qualifiers to get rid of compiler warnings

Andrew Savchenko bircoph at gmail.com
Wed May 6 02:39:59 CEST 2009


Hi,

On Tuesday 05 May 2009, Diego Biurrun wrote:
> On Tue, May 05, 2009 at 09:24:21PM +0300, Uoti Urpala wrote:
> > On Tue, 2009-05-05 at 20:10 +0200, Diego Biurrun wrote:
> > > $attached removes const qualifiers from array declarations
> > > where gcc was warning about 'initialization discards
> > > qualifiers from pointer target type'.
> > >
> > > This eliminates all the remaining warnings on mplayer.c and
> > > mencoder.c. I'm not sure this is the best solution though.
> >
> > That's wrong, those arrays are clearly constant (any code
> > trying to change them would be badly broken).
>
> Is there a solution that gets rid of the warnings?

An attached patch should fix all issues with mplayer's native code 
on my system (obviously I can't complie all possible modules and 
subsystems). Though, some discarded qualifier appears into svn 
external stuff (libav*) and libswscale, so they aren't fixed here.

-- 
Best regards,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: discarded-qualifiers.patch
Type: text/x-diff
Size: 16436 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090506/1ee85958/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090506/1ee85958/attachment.pgp>


More information about the MPlayer-dev-eng mailing list