[MPlayer-dev-eng] [PATCH] Remove constant controlling expressions

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Aug 9 10:55:42 CEST 2007


Hi!

On 2007-08-08 23:57, Trent Piepho wrote:
> On Thu, 9 Aug 2007, Carl Eugen Hoyos wrote:
> > icc claims that the following variables cannot be null ("warning #279:
> > controlling expression is constant"):
> >
> > char osdmessagetext[MESSAGE_SIZE];
> > char posbar[MESSAGE_SIZE];
> > static char vidix_name[32] = "";
> >
> > Patch ok or am I misunderstanding the warning?
> 
> -         if(osdmessagetext) {
>             memset(c->textbuffer + osdy * aa_scrwidth(c) + osdx,' ',strlen(osdmessagetext));
>             memset(c->attrbuffer + osdy * aa_scrwidth(c) + osdx ,0,strlen(osdmessagetext));
>             osdmessagetext[0] = '\0';
> -         }
> 
> What the author probably meant to write is:
> 
>     if(*osdmessagetext)

Thank you.

I'll apply the following patch if nobody objects (I didn't change
vo_svga.c because -vo svga:vidix crashes for me).

Carl Eugen

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patchvo
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20070809/5f7324ba/attachment.asc>


More information about the MPlayer-dev-eng mailing list