[Speex-dev] [PATCH] build warnings in mdf.c

Jean-Marc Valin Jean-Marc.Valin at USherbrooke.ca
Wed Nov 9 01:42:54 PST 2005


Hi,

I've been made aware of that. I'll fix it in svn soon.

	Jean-Marc

Le mercredi 09 novembre 2005 à 02:05 +0100, Alfred E. Heggestad a
écrit :
> Hi
> 
> I just upgraded to http://svn.xiph.org/trunk/speex r10357
> and got this build warning:
> 
> 
> alfredh at io:$ make -s mdf.o
> libspeex/mdf.c: In function 'speex_echo_cancel':
> libspeex/mdf.c:321: warning: statement with no effect
> libspeex/mdf.c:317: warning: `adapt_rate' might be used uninitialized in this function
> 
> 
> Is this intentional? In any case here is a simple fix:
> 
> 
> Index: libspeex/mdf.c
> ===================================================================
> --- libspeex/mdf.c      (revision 10357)
> +++ libspeex/mdf.c      (working copy)
> @@ -314,11 +314,10 @@
>        /*printf ("%f\n", leak_estimate);*/
>     }
>     
> -   float adapt_rate;
> +   float adapt_rate = 0;
>     if (!st->adapted)
>     {
>        float Sxx;
> -      adapt_rate;
>        Sxx = inner_prod(st->x+st->frame_size, st->x+st->frame_size, st->frame_size);
>  
>        /* We consider that the filter is adapted if the following is true*/
> 
> 
> _______________________________________________
> Speex-dev mailing list
> Speex-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/speex-dev
> 


More information about the Speex-dev mailing list