[MPlayer-dev-eng] [PATCH] remove some unused variables

timwoj at ieee.org timwoj at ieee.org
Mon May 28 06:43:37 CEST 2007


On Mon, 28 May 2007, Zuxy Meng wrote:

> Hi,
>
> 2007/5/28, timwoj at ieee.org <timwoj at ieee.org>:
>> I ran a build the other day with -Wall.  This patch removes most of the
>> unused variables that gcc copmlained about.
>>
>> Index: libmpcodecs/ad_hwmpa.c
>> ===========================================================>========
>> --- libmpcodecs/ad_hwmpa.c	(revision 23396)
>> +++ libmpcodecs/ad_hwmpa.c	(working copy)
>> @@ -28,7 +28,7 @@
>>
>> static int mpa_sync(sh_audio_t *sh, int no_frames, int *n, int *chans, int *srate, >int *spf, int *mpa_layer, int *br)
>> {
>> -	int cnt = 0, x = 0, len, frames_count;
>> +	int cnt = 0, x = 0, len = 0, frames_count;
>>
>> 	frames_count = 0;
>> 	do
>> @@ -122,7 +122,7 @@
>>
>> static int control(sh_audio_t *sh,int cmd,void* arg, ...)
>> {
>> -	int start, len;
>> +	int start, len = 0;
>>
>> 	switch(cmd)
>> 	{
>
> Is this related?
>

They're some other warnings, but weren't supposed to be part of this 
patch.  I have a few other things to send later.  This patch was just 
supposed to be the unused variables.  Should I send another copy without 
those?

Tim



More information about the MPlayer-dev-eng mailing list