[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.11-171-g13018d6

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Aug 29 14:54:07 PDT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  506eacc9228eaf4f9ed805ca22157988327311fb (commit)

- Log -----------------------------------------------------------------
13018d6... fix a few compiler warnings on older gcc
-----------------------------------------------------------------------

Summary of changes:
 src/pulse/context.c           |    2 +-
 src/pulse/simple.c            |    2 +-
 src/pulse/utf8.c              |   18 +++++++++---------
 src/pulse/volume.c            |    2 +-
 src/pulsecore/atomic.h        |    2 +-
 src/pulsecore/authkey.c       |    4 ++--
 src/pulsecore/memblockq.h     |    2 +-
 src/pulsecore/shm.c           |    2 +-
 src/pulsecore/socket-client.c |    2 +-
 src/utils/padsp.c             |    2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

-----------------------------------------------------------------------

commit 13018d62c10731459b0b4fd3f6852dcebddbccb8
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 29 23:53:55 2008 +0200

    fix a few compiler warnings on older gcc

diff --git a/src/pulse/context.c b/src/pulse/context.c
index 99a47a1..f1aa498 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 51160ad..79e39eb 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 91aa9c8..7671be4 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 768bf49..15938cb 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) {
diff --git a/src/pulsecore/atomic.h b/src/pulsecore/atomic.h
index 25b77e5..9c58c66 100644
--- a/src/pulsecore/atomic.h
+++ b/src/pulsecore/atomic.h
@@ -42,7 +42,7 @@
 #error "Please include config.h before including this file!"
 #endif
 
-#if HAVE_ATOMIC_BUILTINS
+#ifdef HAVE_ATOMIC_BUILTINS
 
 /* __sync based implementation */
 
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index 2f703be..b122fee 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
@@ -54,8 +54,8 @@ static int generate(int fd, void *ret_data, size_t length) {
 
     pa_random(ret_data, length);
 
-    lseek(fd, 0, SEEK_SET);
-    (void) ftruncate(fd, 0);
+    lseek(fd, (off_t) 0, SEEK_SET);
+    (void) ftruncate(fd, (off_t) 0);
 
     if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) {
         pa_log("Failed to write cookie file: %s", pa_cstrerror(errno));
diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h
index 4b9450f..31f908d 100644
--- a/src/pulsecore/memblockq.h
+++ b/src/pulsecore/memblockq.h
@@ -155,7 +155,7 @@ void pa_memblockq_set_maxlength(pa_memblockq *memblockq, size_t maxlength); /* m
 void pa_memblockq_set_tlength(pa_memblockq *memblockq, size_t tlength); /* might modify minreq, too */
 void pa_memblockq_set_prebuf(pa_memblockq *memblockq, size_t prebuf); /* might modify minreq, too */
 void pa_memblockq_set_minreq(pa_memblockq *memblockq, size_t minreq);
-void pa_memblockq_set_maxrewind(pa_memblockq *memblockq, size_t rewind); /* Set the maximum history size */
+void pa_memblockq_set_maxrewind(pa_memblockq *memblockq, size_t maxrewind); /* Set the maximum history size */
 void pa_memblockq_set_silence(pa_memblockq *memblockq, pa_memchunk *silence);
 
 /* Call pa_memchunk_willneed() for every chunk in the queue from the current read pointer to the end */
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index b087020..05b0679 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -105,7 +105,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
         m->size = size;
 
 #ifdef MAP_ANONYMOUS
-        if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
+        if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
             pa_log("mmap() failed: %s", pa_cstrerror(errno));
             goto fail;
         }
diff --git a/src/pulsecore/socket-client.c b/src/pulsecore/socket-client.c
index 3bde40d..6739eff 100644
--- a/src/pulsecore/socket-client.c
+++ b/src/pulsecore/socket-client.c
@@ -437,7 +437,7 @@ static void start_timeout(pa_socket_client *c) {
     pa_assert(!c->timeout_event);
 
     pa_gettimeofday(&tv);
-    pa_timeval_add(&tv, CONNECT_TIMEOUT * 1000000);
+    pa_timeval_add(&tv, CONNECT_TIMEOUT * PA_USEC_PER_SEC);
     c->timeout_event = c->mainloop->time_new(c->mainloop, &tv, timeout_cb, c);
 }
 
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index 134a7e5..2c88c48 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -864,7 +864,7 @@ static int fd_info_copy_data(fd_info *i, int force) {
                 return -1;
             }
 
-            if (pa_stream_write(i->play_stream, i->buf, (size_t) r, free, 0, PA_SEEK_RELATIVE) < 0) {
+            if (pa_stream_write(i->play_stream, i->buf, (size_t) r, free, 0LL, PA_SEEK_RELATIVE) < 0) {
                 debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_write(): %s\n", pa_strerror(pa_context_errno(i->context)));
                 return -1;
             }

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list