projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
175a218
)
tests/: add void to prototypes to build with -Wstrict-prototypes
author
Paul Brossier
<piem@piem.org>
Mon, 30 Dec 2013 21:09:32 +0000
(17:09 -0400)
committer
Paul Brossier
<piem@piem.org>
Mon, 30 Dec 2013 21:09:32 +0000
(17:09 -0400)
32 files changed:
tests/src/onset/test-peakpicker.c
patch
|
blob
|
history
tests/src/pitch/test-pitch.c
patch
|
blob
|
history
tests/src/pitch/test-pitchfcomb.c
patch
|
blob
|
history
tests/src/pitch/test-pitchmcomb.c
patch
|
blob
|
history
tests/src/pitch/test-pitchschmitt.c
patch
|
blob
|
history
tests/src/pitch/test-pitchspecacf.c
patch
|
blob
|
history
tests/src/pitch/test-pitchyin.c
patch
|
blob
|
history
tests/src/pitch/test-pitchyinfft.c
patch
|
blob
|
history
tests/src/spectral/test-fft.c
patch
|
blob
|
history
tests/src/spectral/test-filterbank.c
patch
|
blob
|
history
tests/src/spectral/test-filterbank_mel.c
patch
|
blob
|
history
tests/src/spectral/test-mfcc.c
patch
|
blob
|
history
tests/src/spectral/test-phasevoc.c
patch
|
blob
|
history
tests/src/spectral/test-specdesc.c
patch
|
blob
|
history
tests/src/spectral/test-tss.c
patch
|
blob
|
history
tests/src/tempo/test-beattracking.c
patch
|
blob
|
history
tests/src/temporal/test-a_weighting.c
patch
|
blob
|
history
tests/src/temporal/test-biquad.c
patch
|
blob
|
history
tests/src/temporal/test-c_weighting.c
patch
|
blob
|
history
tests/src/temporal/test-filter.c
patch
|
blob
|
history
tests/src/temporal/test-resampler.c
patch
|
blob
|
history
tests/src/test-cvec.c
patch
|
blob
|
history
tests/src/test-delnull.c
patch
|
blob
|
history
tests/src/test-fmat.c
patch
|
blob
|
history
tests/src/test-fvec.c
patch
|
blob
|
history
tests/src/test-lvec.c
patch
|
blob
|
history
tests/src/test-mathutils-window.c
patch
|
blob
|
history
tests/src/test-mathutils.c
patch
|
blob
|
history
tests/src/utils/test-hist.c
patch
|
blob
|
history
tests/src/utils/test-parameter.c
patch
|
blob
|
history
tests/src/utils/test-scale.c
patch
|
blob
|
history
tests/utils_tests.h
patch
|
blob
|
history
diff --git
a/tests/src/onset/test-peakpicker.c
b/tests/src/onset/test-peakpicker.c
index
4113082
..
e86232d
100644
(file)
--- a/
tests/src/onset/test-peakpicker.c
+++ b/
tests/src/onset/test-peakpicker.c
@@
-2,7
+2,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 1024; // window size
fvec_t * in = new_fvec (win_s); // input buffer
{
uint_t win_s = 1024; // window size
fvec_t * in = new_fvec (win_s); // input buffer
diff --git
a/tests/src/pitch/test-pitch.c
b/tests/src/pitch/test-pitch.c
index
57427e3
..
1509870
100644
(file)
--- a/
tests/src/pitch/test-pitch.c
+++ b/
tests/src/pitch/test-pitch.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
// 1. allocate some memory
uint_t n = 0; // frame counter
{
// 1. allocate some memory
uint_t n = 0; // frame counter
diff --git
a/tests/src/pitch/test-pitchfcomb.c
b/tests/src/pitch/test-pitchfcomb.c
index
1ce1e5d
..
718537b
100644
(file)
--- a/
tests/src/pitch/test-pitchfcomb.c
+++ b/
tests/src/pitch/test-pitchfcomb.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t i = 0;
uint_t win_s = 1024; // window size
{
uint_t i = 0;
uint_t win_s = 1024; // window size
diff --git
a/tests/src/pitch/test-pitchmcomb.c
b/tests/src/pitch/test-pitchmcomb.c
index
471bffd
..
9e8483b
100644
(file)
--- a/
tests/src/pitch/test-pitchmcomb.c
+++ b/
tests/src/pitch/test-pitchmcomb.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/pitch/test-pitchschmitt.c
b/tests/src/pitch/test-pitchschmitt.c
index
b856302
..
bae7f81
100644
(file)
--- a/
tests/src/pitch/test-pitchschmitt.c
+++ b/
tests/src/pitch/test-pitchschmitt.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/pitch/test-pitchspecacf.c
b/tests/src/pitch/test-pitchspecacf.c
index
de22c07
..
5a4fa23
100644
(file)
--- a/
tests/src/pitch/test-pitchspecacf.c
+++ b/
tests/src/pitch/test-pitchspecacf.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/pitch/test-pitchyin.c
b/tests/src/pitch/test-pitchyin.c
index
a7cad73
..
9b45c55
100644
(file)
--- a/
tests/src/pitch/test-pitchyin.c
+++ b/
tests/src/pitch/test-pitchyin.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/pitch/test-pitchyinfft.c
b/tests/src/pitch/test-pitchyinfft.c
index
158aea7
..
ee1ece8
100644
(file)
--- a/
tests/src/pitch/test-pitchyinfft.c
+++ b/
tests/src/pitch/test-pitchyinfft.c
@@
-5,7
+5,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/spectral/test-fft.c
b/tests/src/spectral/test-fft.c
index
101c406
..
6405de4
100644
(file)
--- a/
tests/src/spectral/test-fft.c
+++ b/
tests/src/spectral/test-fft.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 8; // window size
fvec_t * in = new_fvec (win_s); // input buffer
{
uint_t win_s = 8; // window size
fvec_t * in = new_fvec (win_s); // input buffer
diff --git
a/tests/src/spectral/test-filterbank.c
b/tests/src/spectral/test-filterbank.c
index
d839bc6
..
543226d
100644
(file)
--- a/
tests/src/spectral/test-filterbank.c
+++ b/
tests/src/spectral/test-filterbank.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 1024; // window size
uint_t n_filters = 13; // number of filters
{
uint_t win_s = 1024; // window size
uint_t n_filters = 13; // number of filters
diff --git
a/tests/src/spectral/test-filterbank_mel.c
b/tests/src/spectral/test-filterbank_mel.c
index
23e402e
..
0a0c670
100644
(file)
--- a/
tests/src/spectral/test-filterbank_mel.c
+++ b/
tests/src/spectral/test-filterbank_mel.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t samplerate = 16000; // samplerate of signal to filter
uint_t win_s = 512; // fft size
{
uint_t samplerate = 16000; // samplerate of signal to filter
uint_t win_s = 512; // fft size
diff --git
a/tests/src/spectral/test-mfcc.c
b/tests/src/spectral/test-mfcc.c
index
a2d4d58
..
23f8c64
100644
(file)
--- a/
tests/src/spectral/test-mfcc.c
+++ b/
tests/src/spectral/test-mfcc.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 512; // fft size
uint_t n_filters = 40; // number of filters
{
uint_t win_s = 512; // fft size
uint_t n_filters = 40; // number of filters
diff --git
a/tests/src/spectral/test-phasevoc.c
b/tests/src/spectral/test-phasevoc.c
index
d4edb23
..
e43b881
100644
(file)
--- a/
tests/src/spectral/test-phasevoc.c
+++ b/
tests/src/spectral/test-phasevoc.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 6; // compute n times
uint_t win_s = 32; // window size
{
uint_t n = 6; // compute n times
uint_t win_s = 32; // window size
diff --git
a/tests/src/spectral/test-specdesc.c
b/tests/src/spectral/test-specdesc.c
index
b99ea16
..
f890e59
100644
(file)
--- a/
tests/src/spectral/test-specdesc.c
+++ b/
tests/src/spectral/test-specdesc.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 1024; // window size
cvec_t *in = new_cvec (win_s); // input buffer
{
uint_t win_s = 1024; // window size
cvec_t *in = new_cvec (win_s); // input buffer
diff --git
a/tests/src/spectral/test-tss.c
b/tests/src/spectral/test-tss.c
index
201d35b
..
0e18b20
100644
(file)
--- a/
tests/src/spectral/test-tss.c
+++ b/
tests/src/spectral/test-tss.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
{
uint_t n = 10; // compute n times
uint_t win_s = 1024; // window size
diff --git
a/tests/src/tempo/test-beattracking.c
b/tests/src/tempo/test-beattracking.c
index
864ea96
..
323e493
100644
(file)
--- a/
tests/src/tempo/test-beattracking.c
+++ b/
tests/src/tempo/test-beattracking.c
@@
-3,7
+3,7
@@
#include <aubio.h>
#include <stdio.h>
#include <aubio.h>
#include <stdio.h>
-int main ()
+int main (
void
)
{
uint_t i = 0;
uint_t win_s = 1024; // window size
{
uint_t i = 0;
uint_t win_s = 1024; // window size
diff --git
a/tests/src/temporal/test-a_weighting.c
b/tests/src/temporal/test-a_weighting.c
index
3ac3c26
..
f6399b5
100644
(file)
--- a/
tests/src/temporal/test-a_weighting.c
+++ b/
tests/src/temporal/test-a_weighting.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
aubio_filter_t * f;
{
aubio_filter_t * f;
diff --git
a/tests/src/temporal/test-biquad.c
b/tests/src/temporal/test-biquad.c
index
33c1ca0
..
8317b06
100644
(file)
--- a/
tests/src/temporal/test-biquad.c
+++ b/
tests/src/temporal/test-biquad.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 64; // window size
{
uint_t win_s = 64; // window size
diff --git
a/tests/src/temporal/test-c_weighting.c
b/tests/src/temporal/test-c_weighting.c
index
dccaa58
..
96d8ee7
100644
(file)
--- a/
tests/src/temporal/test-c_weighting.c
+++ b/
tests/src/temporal/test-c_weighting.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
aubio_filter_t * f;
{
aubio_filter_t * f;
diff --git
a/tests/src/temporal/test-filter.c
b/tests/src/temporal/test-filter.c
index
8461db0
..
260d81b
100644
(file)
--- a/
tests/src/temporal/test-filter.c
+++ b/
tests/src/temporal/test-filter.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 16; // window size
uint_t impulse_at = win_s / 2;
{
uint_t win_s = 16; // window size
uint_t impulse_at = win_s / 2;
diff --git
a/tests/src/temporal/test-resampler.c
b/tests/src/temporal/test-resampler.c
index
1ac65e9
..
ee818e1
100644
(file)
--- a/
tests/src/temporal/test-resampler.c
+++ b/
tests/src/temporal/test-resampler.c
@@
-1,6
+1,6
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t win_s = 1024; // window size
smpl_t ratio = 0.5;
{
uint_t win_s = 1024; // window size
smpl_t ratio = 0.5;
diff --git
a/tests/src/test-cvec.c
b/tests/src/test-cvec.c
index
9b02d12
..
59272f0
100644
(file)
--- a/
tests/src/test-cvec.c
+++ b/
tests/src/test-cvec.c
@@
-1,7
+1,7
@@
#include <aubio.h>
#include "utils_tests.h"
#include <aubio.h>
#include "utils_tests.h"
-int main ()
+int main (
void
)
{
uint_t i, window_size = 16; // window size
utils_init_random();
{
uint_t i, window_size = 16; // window size
utils_init_random();
diff --git
a/tests/src/test-delnull.c
b/tests/src/test-delnull.c
index
96d472c
..
1c7ecd8
100644
(file)
--- a/
tests/src/test-delnull.c
+++ b/
tests/src/test-delnull.c
@@
-4,7
+4,7
@@
// Because aubio does not check for double free, this program will crash.
// Programs that call these functions should check for null pointers.
// Because aubio does not check for double free, this program will crash.
// Programs that call these functions should check for null pointers.
-int main ()
+int main (
void
)
{
del_fvec(NULL);
del_lvec(NULL);
{
del_fvec(NULL);
del_lvec(NULL);
diff --git
a/tests/src/test-fmat.c
b/tests/src/test-fmat.c
index
718903d
..
ab8b274
100644
(file)
--- a/
tests/src/test-fmat.c
+++ b/
tests/src/test-fmat.c
@@
-4,7
+4,7
@@
// create a new matrix and fill it with i * 1. + j * .1, where i is the row,
// and j the column.
// create a new matrix and fill it with i * 1. + j * .1, where i is the row,
// and j the column.
-int main ()
+int main (
void
)
{
uint_t height = 3, length = 9, i, j;
// create fmat_t object
{
uint_t height = 3, length = 9, i, j;
// create fmat_t object
diff --git
a/tests/src/test-fvec.c
b/tests/src/test-fvec.c
index
8a1e63c
..
fbbd418
100644
(file)
--- a/
tests/src/test-fvec.c
+++ b/
tests/src/test-fvec.c
@@
-1,7
+1,7
@@
#include <aubio.h>
#include <assert.h>
#include <aubio.h>
#include <assert.h>
-int main ()
+int main (
void
)
{
uint_t vec_size = 10, i;
fvec_t * vec = new_fvec (vec_size);
{
uint_t vec_size = 10, i;
fvec_t * vec = new_fvec (vec_size);
diff --git
a/tests/src/test-lvec.c
b/tests/src/test-lvec.c
index
b115bb3
..
6e5c531
100644
(file)
--- a/
tests/src/test-lvec.c
+++ b/
tests/src/test-lvec.c
@@
-1,7
+1,7
@@
#include <aubio.h>
#include "utils_tests.h"
#include <aubio.h>
#include "utils_tests.h"
-int main
(
)
+int main
(void
)
{
uint_t win_s = 32; // window size
lvec_t * sp = new_lvec (win_s); // input buffer
{
uint_t win_s = 32; // window size
lvec_t * sp = new_lvec (win_s); // input buffer
diff --git
a/tests/src/test-mathutils-window.c
b/tests/src/test-mathutils-window.c
index
e3db514
..
e09626f
100644
(file)
--- a/
tests/src/test-mathutils-window.c
+++ b/
tests/src/test-mathutils-window.c
@@
-2,7
+2,7
@@
#include <math.h>
#include <stdio.h>
#include <math.h>
#include <stdio.h>
-int main ()
+int main (
void
)
{
uint_t length = 0;
uint_t n_length = 4, n_types = 10, i, t;
{
uint_t length = 0;
uint_t n_length = 4, n_types = 10, i, t;
diff --git
a/tests/src/test-mathutils.c
b/tests/src/test-mathutils.c
index
96ace80
..
62631f0
100644
(file)
--- a/
tests/src/test-mathutils.c
+++ b/
tests/src/test-mathutils.c
@@
-3,7
+3,7
@@
#define AUBIO_UNSTABLE 1
#include <aubio.h>
#define AUBIO_UNSTABLE 1
#include <aubio.h>
-int test_next_power_of_two
(
)
+int test_next_power_of_two
(void
)
{
uint_t a, b;
a = 15; b = aubio_next_power_of_two(a); assert(b == 16);
{
uint_t a, b;
a = 15; b = aubio_next_power_of_two(a); assert(b == 16);
@@
-24,7
+24,7
@@
int test_next_power_of_two()
return 0;
}
return 0;
}
-int test_miditofreq
(
)
+int test_miditofreq
(void
)
{
smpl_t a, b;
fprintf(stdout, "b = aubio_miditofreq(a): [");
{
smpl_t a, b;
fprintf(stdout, "b = aubio_miditofreq(a): [");
@@
-55,7
+55,7
@@
int test_miditofreq()
return 0;
}
return 0;
}
-int test_freqtomidi
(
)
+int test_freqtomidi
(void
)
{
smpl_t midi, freq;
fprintf(stdout, "b = aubio_freqtomidi(a): [");
{
smpl_t midi, freq;
fprintf(stdout, "b = aubio_freqtomidi(a): [");
@@
-87,7
+87,7
@@
int test_freqtomidi()
return 0;
}
return 0;
}
-int test_aubio_window
(
)
+int test_aubio_window
(void
)
{
uint_t window_size = 16;
fvec_t * window = new_aubio_window("default", window_size);
{
uint_t window_size = 16;
fvec_t * window = new_aubio_window("default", window_size);
@@
-107,7
+107,7
@@
int test_aubio_window()
return 0;
}
return 0;
}
-int main ()
+int main (
void
)
{
test_next_power_of_two();
test_miditofreq();
{
test_next_power_of_two();
test_miditofreq();
diff --git
a/tests/src/utils/test-hist.c
b/tests/src/utils/test-hist.c
index
dc347e7
..
ee3bc9b
100644
(file)
--- a/
tests/src/utils/test-hist.c
+++ b/
tests/src/utils/test-hist.c
@@
-2,7
+2,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t length;
for (length = 1; length < 10; length ++ ) {
{
uint_t length;
for (length = 1; length < 10; length ++ ) {
diff --git
a/tests/src/utils/test-parameter.c
b/tests/src/utils/test-parameter.c
index
177e63d
..
dd2b963
100644
(file)
--- a/
tests/src/utils/test-parameter.c
+++ b/
tests/src/utils/test-parameter.c
@@
-20,7
+20,7
@@
void get_some_steps ( aubio_parameter_t * param )
}
}
-int main ()
+int main (
void
)
{
smpl_t max_value = 100.;
smpl_t min_value = 0.;
{
smpl_t max_value = 100.;
smpl_t min_value = 0.;
diff --git
a/tests/src/utils/test-scale.c
b/tests/src/utils/test-scale.c
index
bc80296
..
df1f0d8
100644
(file)
--- a/
tests/src/utils/test-scale.c
+++ b/
tests/src/utils/test-scale.c
@@
-2,7
+2,7
@@
#include <aubio.h>
#include <aubio.h>
-int main ()
+int main (
void
)
{
uint_t n = 0;
uint_t win_s = 1024; // window size
{
uint_t n = 0;
uint_t win_s = 1024; // window size
diff --git
a/tests/utils_tests.h
b/tests/utils_tests.h
index
8ab5fe7
..
07f0719
100644
(file)
--- a/
tests/utils_tests.h
+++ b/
tests/utils_tests.h
@@
-26,7
+26,9
@@
uint_t random(void) {
}
#endif
}
#endif
-void utils_init_random () {
+void utils_init_random (void);
+
+void utils_init_random (void) {
time_t now = time(0);
struct tm *tm_struct = localtime(&now);
int seed = tm_struct->tm_sec;
time_t now = time(0);
struct tm *tm_struct = localtime(&now);
int seed = tm_struct->tm_sec;