summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Henningsson <diwic@ubuntu.com>2016-04-02 06:24:18 +0200
committerDavid Henningsson <diwic@ubuntu.com>2016-04-02 06:24:18 +0200
commitd3845a0f8a339b5947fa8b5274f65b75744ad29d (patch)
treeed2a70bf99caf1a4ccccc7eaf87a167052b67fed
parent27d0a3b388899a1799be20040d93cded9d74c813 (diff)
downloadpulseaudio-d3845a0f8a339b5947fa8b5274f65b75744ad29d.tar.gz
memblock/pstream: Fix two compiler warnings
Fix two compiler warnings recently introduced by the memfd patch set. Signed-off-by: David Henningsson <diwic@ubuntu.com>
-rw-r--r--src/pulsecore/memblock.c2
-rw-r--r--src/pulsecore/pstream-util.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c
index 57b0645ba..17520edb3 100644
--- a/src/pulsecore/memblock.c
+++ b/src/pulsecore/memblock.c
@@ -1135,7 +1135,7 @@ static pa_memimport_segment* segment_attach(pa_memimport *i, pa_mem_type_t type,
/* Should be called locked */
static void segment_detach(pa_memimport_segment *seg) {
pa_assert(seg);
- pa_assert(seg->n_blocks == (segment_is_permanent(seg) ? 1 : 0));
+ pa_assert(seg->n_blocks == (segment_is_permanent(seg) ? 1u : 0u));
pa_hashmap_remove(seg->import->segments, PA_UINT32_TO_PTR(seg->memory.id));
pa_shm_free(&seg->memory);
diff --git a/src/pulsecore/pstream-util.c b/src/pulsecore/pstream-util.c
index 449ea1f85..505f0cf56 100644
--- a/src/pulsecore/pstream-util.c
+++ b/src/pulsecore/pstream-util.c
@@ -191,6 +191,8 @@ finish:
return ret;
#else
- pa_assert_not_reached();
+ pa_assert(fail_reason);
+ *fail_reason = "memfd support not compiled in";
+ return -1;
#endif
}