History

tests/ : Use fftw_cleanup() to remove all memory leaks reported by valgrind.

Erik de Castro Lopo committed 14 years ago

Commit 57c95131 parent cf3601b4 files · +23 −3Browse files

Unified · Split

4 files
  1. ChangeLog +5 −0
  2. tests/multi_channel_test.c +11 −1
  3. tests/snr_bw_test.c +5 −1
  4. tests/varispeed_test.c +2 −1
ChangeLog+5−0
@@ -1,3 +1,8 @@
1+2012-08-23 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
2+
3+ * tests/multi_channel_test.c tests/snr_bw_test.c tests/varispeed_test.c
4+ Use fftw_cleanup() to remove all memory leaks reported by valgrind.
5+
16 2012-08-22 Erik de Castro Lopo <erikd AT mega-nerd DOT com>
27
38 * src/src_sinc.c
tests/multi_channel_test.c+11−1
@@ -1,5 +1,5 @@
11 /*
2−** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
2+** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
33 **
44 ** This program is free software; you can redistribute it and/or modify
55 ** it under the terms of the GNU General Public License as published by
@@ -24,6 +24,15 @@ · 18 unmodified lines
2424 #include <math.h>
2525 #include <assert.h>
2626
27+#if (HAVE_FFTW3)
28+#include <fftw3.h>
29+#else
30+static inline void
31+fftw_cleanup (void)
32+{ return ;
33+}
34+#endif
35+
2736 #include <samplerate.h>
2837
2938 #include "util.h"
@@ -65,6 +74,7 @@ main (void) · 35 unmodified lines
6574 callback_test (SRC_SINC_FASTEST, k, target) ;
6675 } ;
6776
77+ fftw_cleanup () ;
6878 puts ("") ;
6979
7080 return 0 ;
tests/snr_bw_test.c+5−1
@@ -1,5 +1,5 @@
11 /*
2−** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
2+** Copyright (C) 2002-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
33 **
44 ** This program is free software; you can redistribute it and/or modify
55 ** it under the terms of the GNU General Public License as published by
@@ -26,6 +26,8 @@ · 20 unmodified lines
2626
2727 #if (HAVE_FFTW3)
2828
29+#include <fftw3.h>
30+
2931 #include <samplerate.h>
3032
3133 #include "util.h"
@@ -178,6 +180,8 @@ main (int argc, char *argv []) · 146 unmodified lines
178180 printf (" Measured -3dB rolloff point : %5.2f %%.\n\n", freq3dB) ;
179181 } ;
180182
183+ fftw_cleanup () ;
184+
181185 return 0 ;
182186 } /* main */
183187
tests/varispeed_test.c+2−1
@@ -1,5 +1,5 @@
11 /*
2−** Copyright (C) 2006-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
2+** Copyright (C) 2006-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
33 **
44 ** This program is free software; you can redistribute it and/or modify
55 ** it under the terms of the GNU General Public License as published by
@@ -42,6 +42,7 @@ main (void) · 36 unmodified lines
4242 printf (" Sinc interpolator : ") ;
4343 varispeed_test (SRC_SINC_FASTEST, 115.0) ;
4444
45+ fftw_cleanup () ;
4546 puts ("") ;
4647
4748 return 0 ;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t