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

Alfred E. Heggestad alfredh at owera.com
Tue Nov 8 17:05:09 PST 2005


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*/




More information about the Speex-dev mailing list