[MPlayer-dev-eng] [PATCH] Remove constant controlling expressions
Trent Piepho
xyzzy at speakeasy.org
Thu Aug 9 01:57:28 CEST 2007
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)
More information about the MPlayer-dev-eng
mailing list