mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-10 13:29:58 -05:00
build-sys: Move to compiling with C11 support
This is needed for building with anonymous unions. A bunch of calls to fail() that used to mysteriously work need fixing -- fail() is a macro that takes a printf-style message as an argument. Not passing this somehow worked with the previous compiler flags, but breaks with -std=c11.
This commit is contained in:
parent
8949ed96c6
commit
aa02e1654b
14 changed files with 98 additions and 20 deletions
|
|
@ -80,7 +80,7 @@ static void connect(const char *name, int *try) {
|
|||
/* Connect the context */
|
||||
if (pa_context_connect(context, NULL, 0, NULL) < 0) {
|
||||
fprintf(stderr, "pa_context_connect() failed.\n");
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
|
||||
ret = pa_threaded_mainloop_start(mainloop);
|
||||
|
|
@ -144,7 +144,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
|
|||
default:
|
||||
case PA_STREAM_FAILED:
|
||||
fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -190,7 +190,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
|||
case PA_CONTEXT_FAILED:
|
||||
default:
|
||||
fprintf(stderr, "Context error: %s\n", pa_strerror(pa_context_errno(c)));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ static void run_mix_test(
|
|||
i,
|
||||
samples[i], samples_ref[i],
|
||||
samples0[i], samples1[i]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ static void run_remap_test_float(
|
|||
pa_log_debug("Correctness test failed: align=%d", align);
|
||||
pa_log_debug("%d: %.24f != %.24f\n", i,
|
||||
out[i], out_ref[i]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@ static void run_remap_test_s16(
|
|||
if (abs(out[i] - out_ref[i]) > 3) {
|
||||
pa_log_debug("Correctness test failed: align=%d", align);
|
||||
pa_log_debug("%d: %d != %d\n", i, out[i], out_ref[i]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static void run_conv_test_float_to_s16(
|
|||
if (abs(samples[i] - samples_ref[i]) > 1) {
|
||||
pa_log_debug("Correctness test failed: align=%d", align);
|
||||
pa_log_debug("%d: %04hx != %04hx (%.24f)\n", i, samples[i], samples_ref[i], floats[i]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -115,7 +115,7 @@ static void run_conv_test_s16_to_float(
|
|||
if (fabsf(floats[i] - floats_ref[i]) > 0.0001f) {
|
||||
pa_log_debug("Correctness test failed: align=%d", align);
|
||||
pa_log_debug("%d: %.24f != %.24f (%d)\n", i, floats[i], floats_ref[i], samples[i]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void run_volume_test(
|
|||
pa_log_debug("Correctness test failed: align=%d, channels=%d", align, channels);
|
||||
pa_log_debug("%d: %04hx != %04hx (%04hx * %08x)\n", i, samples[i], samples_ref[i],
|
||||
samples_orig[i], volumes[i % channels]);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static void func(pa_mainloop_api *m, pa_signal_event *e, int sig, void *userdata
|
|||
if ((now - start) >= 30) {
|
||||
m->quit(m, 1);
|
||||
fprintf(stderr, "Test failed\n");
|
||||
fail();
|
||||
ck_abort();
|
||||
} else
|
||||
raise(SIGUSR1);
|
||||
}
|
||||
|
|
@ -78,7 +78,7 @@ START_TEST (cpulimit_test) {
|
|||
|
||||
if ((now - start) >= 30) {
|
||||
fprintf(stderr, "Test failed\n");
|
||||
fail();
|
||||
ck_abort();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
|
|||
default:
|
||||
case PA_STREAM_FAILED:
|
||||
fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
|||
case PA_CONTEXT_FAILED:
|
||||
default:
|
||||
fprintf(stderr, "Context error: %s\n", pa_strerror(pa_context_errno(c)));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ START_TEST (getbinaryname_test) {
|
|||
if (!pa_get_binary_name(exename, allocated)) {
|
||||
pa_log_error("failed to read binary name");
|
||||
pa_xfree(exename);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
|
||||
if (strlen(exename) < allocated - 1) {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
|||
case PA_CONTEXT_FAILED:
|
||||
default:
|
||||
pa_log_error("Context error: %s", pa_strerror(pa_context_errno(c)));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ START_TEST (mult_s16_test) {
|
|||
|
||||
if (a != b) {
|
||||
pa_log_debug("%d: %d != %d", i, a, b);
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ static void stream_state_callback(pa_stream *s, void *userdata) {
|
|||
default:
|
||||
case PA_STREAM_FAILED:
|
||||
fprintf(stderr, "Stream error: %s\n", pa_strerror(pa_context_errno(pa_stream_get_context(s))));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ static void context_state_callback(pa_context *c, void *userdata) {
|
|||
case PA_CONTEXT_FAILED:
|
||||
default:
|
||||
fprintf(stderr, "Context error: %s\n", pa_strerror(pa_context_errno(c)));
|
||||
fail();
|
||||
ck_abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue