mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
tests/mix-test: Don't pass unnecessary NULL fmt argument to fail_unless
GCC warns on all these `fail_unless` calls:
warning: too many arguments for format [-Wformat-extra-args]
`fail_unless` only takes an expression and optionally a string literal
as message with formatting args. Passing NULL for this message should
not be necessary as indicated by all the other tests not passing it
either.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
This commit is contained in:
parent
76652c8cdd
commit
6e1ba7179c
2 changed files with 10 additions and 10 deletions
|
|
@ -76,7 +76,7 @@ static void run_mix_test(
|
|||
samples_ref = out_ref + (8 - align);
|
||||
nsamples = channels * (SAMPLES - (8 - align));
|
||||
|
||||
fail_unless((pool = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0, true)) != NULL, NULL);
|
||||
fail_unless((pool = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0, true)) != NULL);
|
||||
|
||||
pa_random(samples0, nsamples * sizeof(int16_t));
|
||||
c0.memblock = pa_memblock_new_fixed(pool, samples0, nsamples * sizeof(int16_t), false);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
uint8_t *u = d;
|
||||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
fail_unless(*u == *v, NULL);
|
||||
fail_unless(*u == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -109,7 +109,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
uint8_t *u = d;
|
||||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
fail_unless(*u == *v, NULL);
|
||||
fail_unless(*u == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -121,7 +121,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
uint8_t *u = d;
|
||||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
fail_unless(*u == *v, NULL);
|
||||
fail_unless(*u == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
uint16_t uu = PA_MAYBE_UINT16_SWAP(ss->format != PA_SAMPLE_S16NE, *u);
|
||||
fail_unless(uu == *v, NULL);
|
||||
fail_unless(uu == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -149,7 +149,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
float uu = ss->format == PA_SAMPLE_FLOAT32NE ? *u : PA_READ_FLOAT32RE(u);
|
||||
fail_unless(fabsf(uu - *v) <= 1e-6f, NULL);
|
||||
fail_unless(fabsf(uu - *v) <= 1e-6f);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -163,7 +163,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S32NE, *u);
|
||||
fail_unless(uu == *v, NULL);
|
||||
fail_unless(uu == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
uint32_t uu = PA_MAYBE_UINT32_SWAP(ss->format != PA_SAMPLE_S24_32NE, *u);
|
||||
fail_unless(uu == *v, NULL);
|
||||
fail_unless(uu == *v);
|
||||
++u;
|
||||
++v;
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ static void compare_block(const pa_sample_spec *ss, const pa_memchunk *chunk, in
|
|||
|
||||
for (i = 0; i < chunk->length / pa_frame_size(ss); i++) {
|
||||
uint32_t uu = ss->format == PA_SAMPLE_S24LE ? PA_READ24LE(u) : PA_READ24BE(u);
|
||||
fail_unless(uu == PA_READ24BE(v), NULL);
|
||||
fail_unless(uu == PA_READ24BE(v));
|
||||
|
||||
u += 3;
|
||||
v += 3;
|
||||
|
|
@ -286,7 +286,7 @@ START_TEST (mix_test) {
|
|||
if (!getenv("MAKE_CHECK"))
|
||||
pa_log_set_level(PA_LOG_DEBUG);
|
||||
|
||||
fail_unless((pool = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0, true)) != NULL, NULL);
|
||||
fail_unless((pool = pa_mempool_new(PA_MEM_TYPE_PRIVATE, 0, true)) != NULL);
|
||||
|
||||
a.channels = 1;
|
||||
a.rate = 44100;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue