]> code.delx.au - pulseaudio/commitdiff
fix a couple of issues I found when compiling polypaudio with gcc 2.95
authorLennart Poettering <lennart@poettering.net>
Tue, 18 Apr 2006 19:31:50 +0000 (19:31 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Apr 2006 19:31:50 +0000 (19:31 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@754 fefdeb5f-60dc-0310-8127-8f9354f1896f

13 files changed:
src/modules/alsa-util.c
src/modules/module-detect.c
src/modules/module-jack-sink.c
src/modules/module-oss.c
src/modules/module-tunnel.c
src/modules/rtp/module-rtp-recv.c
src/polyp/browser.c
src/polyp/context.c
src/polyp/def.h
src/polyp/stream.c
src/polypcore/socket-client.c
src/polypcore/source.c
src/utils/pacmd.c

index 2f9be07a785a73afbf6b34965948b0a335c015eb..dcc0e0203ed84cb88a0e6c70646c7226a4397ab2 100644 (file)
@@ -51,7 +51,7 @@ struct pa_alsa_fdlist {
     void *userdata;
 };
 
-static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
+static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void *userdata) {
     struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
     int err, i;
     unsigned short revents;
@@ -102,7 +102,7 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t
     a->defer_enable(fdl->defer, 1);
 }
 
-static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
+static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *userdata) {
     struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
     int num_fds, i, err;
     struct pollfd *temp;
index 6b2e27421115a126943359592a176688ab2e9dbf..9cc13e8173394410959904be9ac1a83be6fdcd95 100644 (file)
@@ -259,7 +259,7 @@ fail:
 }
 
 
-void pa__done(pa_core *c, pa_module*m) {
+void pa__done(PA_GCC_UNUSED pa_core *c, PA_GCC_UNUSED pa_module*m) {
     /* NOP */
 }
 
index 4f7a66eb5dd2fcd8aa76114a6b40e9d5d613207b..f340ab6d2e231bfc6b601b18b19e785c37140337 100644 (file)
@@ -112,6 +112,7 @@ static void io_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_
     char x;
     
     assert(m);
+    assert(e);
     assert(flags == PA_IO_EVENT_INPUT);
     assert(u);
     assert(u->pipe_fds[0] == fd);
index d9980d82da158091288dce58a46645494581d324..ccc3c7d9807a1c0cbc30e6a62c46b167b5fd8aa7 100644 (file)
@@ -461,8 +461,9 @@ int pa__init(pa_core *c, pa_module*m) {
      * Without this snippet, poll will never register the fd as ready.
      */
     if (u->source) {
-        char buf[u->sample_size];
+        char *buf = pa_xnew(char, u->sample_size);
         read(u->fd, buf, u->sample_size);
+        pa_xfree(buf);
     }
 
     /* Read mixer settings */
index 70cc950ccf1c031d65061f15a6b9d2562ec4a270..b68bc485f99f740a411902a4eb081a520436037f 100644 (file)
@@ -603,7 +603,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const void
 }
 
 #ifndef TUNNEL_SINK
-static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
+static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, PA_GCC_UNUSED int64_t offset, PA_GCC_UNUSED pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
     struct userdata *u = userdata;
     assert(p && chunk && u);
 
index a714e1625222c4d72e43c7cd176737260b3da8b4..cd5f10e664bf41a3266f7ec2a590ef0e02b4745d 100644 (file)
@@ -477,7 +477,7 @@ fail:
     return -1;
 }
 
-static void free_func(void *p, void *userdata) {
+static void free_func(void *p, PA_GCC_UNUSED void *userdata) {
     session_free(p, 0);
 }
 
index de5c751a34f490aad2e77eaa641c5c8fad1956ba..cef680e401632e8aa223bc4c0cd54db7b58db9f3 100644 (file)
@@ -43,7 +43,7 @@ struct pa_browser {
     pa_io_event *io_event;
 };
 
-static void io_callback(pa_mainloop_api*a, pa_io_event*e, int fd, pa_io_event_flags_t events, void *userdata) {
+static void io_callback(pa_mainloop_api*a, PA_GCC_UNUSED pa_io_event*e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void *userdata) {
     pa_browser *b = userdata;
     assert(a && b && b->mainloop == a);
 
index 047b739f7886c275104c05d6a17354f209104ac3..448e2e68b7b68512d52bf531cb16f4b043d70c9a 100644 (file)
@@ -955,7 +955,7 @@ const char* pa_context_get_server(pa_context *c) {
     return c->server;
 }
 
-uint32_t pa_context_get_protocol_version(pa_context *c) {
+uint32_t pa_context_get_protocol_version(PA_GCC_UNUSED pa_context *c) {
     return PA_PROTOCOL_VERSION;
 }
 
index 80e3092b4ac9eb9c3c0ba5deb181f9223491f506..517dd42269882bf0b7e686f76c927d0938a96c4a 100644 (file)
@@ -288,7 +288,7 @@ typedef enum pa_seek_mode {
     PA_SEEK_RELATIVE = 0,           /**< Seek relatively to the write index */
     PA_SEEK_ABSOLUTE = 1,           /**< Seek relatively to the start of the buffer queue */  
     PA_SEEK_RELATIVE_ON_READ = 2,   /**< Seek relatively to the read index.  */
-    PA_SEEK_RELATIVE_END = 3,       /**< Seek relatively to the current end of the buffer queue. */
+    PA_SEEK_RELATIVE_END = 3        /**< Seek relatively to the current end of the buffer queue. */
 } pa_seek_mode_t;
 
 /** Special sink flags. \since 0.8  */
index ce2470f6fde8e31a08278018747e7d844907a702..e400415c7d62a552539f8dce9ee62d3192abe02d 100644 (file)
@@ -360,7 +360,7 @@ static void invalidate_indexes(pa_stream *s, int r, int w) {
     request_auto_timing_update(s, 1);
 }
 
-static void auto_timing_update_callback(pa_mainloop_api *m, pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void auto_timing_update_callback(PA_GCC_UNUSED pa_mainloop_api *m, PA_GCC_UNUSED pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
     pa_stream *s = userdata;
 
 /*     pa_log("time event");    */
index 1ee19a59980874eca7b50bb25f93a76f4762e9f9..7c4f4d6be8d56c904dd1ced30998712e5a769501 100644 (file)
@@ -371,7 +371,7 @@ static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, PA_GCC_UNUSED
     goto finish;
 
 fail:
-    errno == EHOSTUNREACH;
+    errno = EHOSTUNREACH;
     do_call(c);
     
 finish:
index 9e9415b63632895f78c3c1e9ed8b9a7ba67a1999..3a78825bb3d291d9185ac132f8571ff65a8f3ba6 100644 (file)
@@ -170,7 +170,7 @@ void pa_source_notify(pa_source*s) {
         s->notify(s);
 }
 
-static int do_post(void *p, PA_GCC_UNUSED uint32_t idx, int *del, void*userdata) {
+static int do_post(void *p, PA_GCC_UNUSED uint32_t idx, PA_GCC_UNUSED int *del, void*userdata) {
     pa_source_output *o = p;
     const pa_memchunk *chunk = userdata;
     
index a71e0e934e04666c843e0ca33a8a880b00847c5e..e640ddaf077e73288e07eaee0d8e290659bede39 100644 (file)
@@ -36,7 +36,7 @@
 #include <polypcore/log.h>
 #include <polypcore/pid.h>
 
-int main(PA_GCC_UNUSED int main, PA_GCC_UNUSED char*argv[]) {
+int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
     pid_t pid ;
     int fd = -1;
     int ret = 1, i;