[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 4 commits: gitlab-ci: Bump Ubuntu image to 20.04
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Fri Nov 5 08:03:02 UTC 2021
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
87478843 by Marijn Suijten at 2021-11-05T07:50:56+00:00
gitlab-ci: Bump Ubuntu image to 20.04
e04f14eb/dc9dc70f introduced preprocessor warnings to deny the use of
any `alsa-lib` older than `1.2.1`, and with a future patch disallowing
warnings entirely through `-Werror` we now need a distribution that
serves a new enough `alsa-lib`.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
- - - - -
76652c8c by Marijn Suijten at 2021-11-05T07:50:56+00:00
gitlab-ci: Turn on Werror for meson builds
Prevent simple warnings like !651 from slipping into the build.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
- - - - -
6e1ba717 by Marijn Suijten at 2021-11-05T07:50:56+00: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>
- - - - -
add6e71e by Marijn Suijten at 2021-11-05T07:50:56+00:00
pulsecore/shm: Remove shm_marker struct packing for pa_atomic_t fields
Taking addresses of fields in a packed struct are not guaranteed to be
aligned, resulting in warnings such as:
../src/pulsecore/shm.c: In function 'sharedmem_create':
../src/pulsecore/shm.c:198:25: error: taking address of packed member of 'struct shm_marker' may result in an unaligned pointer value [-Werror=address-of-packed-member]
198 | pa_atomic_store(&marker->pid, (int) getpid());
| ^~~~~~~~~~~~
The struct already has its fields and types laid out in such a way that
the desired packing (without padding) is guaranteed - enforce this with
a `static_assert` to get rid of the unaligned pointer warning.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/653>
- - - - -
4 changed files:
- .gitlab-ci.yml
- src/pulsecore/shm.c
- src/tests/cpu-mix-test.c
- src/tests/mix-test.c
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -19,8 +19,8 @@ variables:
# CI runs, for example when adding new packages to FDO_DISTRIBUTION_PACKAGES.
# The tag is an arbitrary string that identifies the exact container
# contents.
- FDO_DISTRIBUTION_TAG: '2021-03-01-02'
- FDO_DISTRIBUTION_VERSION: '18.04'
+ FDO_DISTRIBUTION_TAG: '2021-11-03-00'
+ FDO_DISTRIBUTION_VERSION: '20.04'
FDO_UPSTREAM_REPO: 'pulseaudio/pulseaudio'
UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG"
@@ -98,7 +98,7 @@ build-meson:
- python3 setup.py install
- cd ..
# Do the actual build
- - meson build
+ - meson build --werror
- cd build
- ninja
- ulimit -c 0 # don't dump core files on tests that are supposed to assert
=====================================
src/pulsecore/shm.c
=====================================
@@ -91,7 +91,10 @@ struct shm_marker {
uint64_t _reserved2;
uint64_t _reserved3;
uint64_t _reserved4;
-} PA_GCC_PACKED;
+};
+
+// Ensure struct is appropriately packed
+static_assert(sizeof(struct shm_marker) == 8 * 5, "`struct shm_marker` is not tightly packed");
static inline size_t shm_marker_size(pa_mem_type_t type) {
if (type == PA_MEM_TYPE_SHARED_POSIX)
=====================================
src/tests/cpu-mix-test.c
=====================================
@@ -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);
=====================================
src/tests/mix-test.c
=====================================
@@ -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;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/0497821afc0ab7ae17d5fe5c365d240eec459495...add6e71e4ca7a280b51e7e0e29784f5382e449a0
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/0497821afc0ab7ae17d5fe5c365d240eec459495...add6e71e4ca7a280b51e7e0e29784f5382e449a0
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20211105/18e3d012/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list