From 13018d62c10731459b0b4fd3f6852dcebddbccb8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 29 Aug 2008 23:53:55 +0200 Subject: fix a few compiler warnings on older gcc --- src/pulse/context.c | 2 +- src/pulse/simple.c | 2 +- src/pulse/utf8.c | 18 +++++++++--------- src/pulse/volume.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/pulse') diff --git a/src/pulse/context.c b/src/pulse/context.c index 99a47a18..f1aa4987 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -201,7 +201,7 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * if (!(c->mempool = pa_mempool_new(!c->conf->disable_shm))) { if (!c->conf->disable_shm) - c->mempool = pa_mempool_new(0); + c->mempool = pa_mempool_new(FALSE); if (!c->mempool) { context_free(c); diff --git a/src/pulse/simple.c b/src/pulse/simple.c index 51160ad7..79e39ebb 100644 --- a/src/pulse/simple.c +++ b/src/pulse/simple.c @@ -272,7 +272,7 @@ int pa_simple_write(pa_simple *p, const void*data, size_t length, int *rerror) { if (l > length) l = length; - r = pa_stream_write(p->stream, data, l, NULL, 0, PA_SEEK_RELATIVE); + r = pa_stream_write(p->stream, data, l, NULL, 0LL, PA_SEEK_RELATIVE); CHECK_SUCCESS_GOTO(p, rerror, r >= 0, unlock_and_fail); data = (const uint8_t*) data + l; diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c index 91aa9c81..7671be46 100644 --- a/src/pulse/utf8.c +++ b/src/pulse/utf8.c @@ -64,24 +64,24 @@ #define FILTER_CHAR '_' -static inline int is_unicode_valid(uint32_t ch) { +static inline pa_bool_t is_unicode_valid(uint32_t ch) { if (ch >= 0x110000) /* End of unicode space */ - return 0; + return FALSE; if ((ch & 0xFFFFF800) == 0xD800) /* Reserved area for UTF-16 */ - return 0; + return FALSE; if ((ch >= 0xFDD0) && (ch <= 0xFDEF)) /* Reserved */ - return 0; + return FALSE; if ((ch & 0xFFFE) == 0xFFFE) /* BOM (Byte Order Mark) */ - return 0; + return FALSE; - return 1; + return TRUE; } -static inline int is_continuation_char(uint8_t ch) { +static inline pa_bool_t is_continuation_char(uint8_t ch) { if ((ch & 0xc0) != 0x80) /* 10xxxxxx */ - return 0; - return 1; + return FALSE; + return TRUE; } static inline void merge_continuation_char(uint32_t *u_ch, uint8_t ch) { diff --git a/src/pulse/volume.c b/src/pulse/volume.c index 768bf49c..15938cbc 100644 --- a/src/pulse/volume.c +++ b/src/pulse/volume.c @@ -122,7 +122,7 @@ double pa_sw_volume_to_linear(pa_volume_t v) { if (v == PA_VOLUME_MUTED) return 0; - return pow(10, pa_sw_volume_to_dB(v)/20); + return pow(10.0, pa_sw_volume_to_dB(v)/20.0); } char *pa_cvolume_snprint(char *s, size_t l, const pa_cvolume *c) { -- cgit