summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-18 19:31:50 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-18 19:31:50 +0000
commit746adcfed5dc396bc4820724b2e951369fc63aeb (patch)
treeb6985d36881b2155863e1e80379687c06973c3d9
parent60008cb1154696a875e69b7bcb739bc9f85ed378 (diff)
fix a couple of issues I found when compiling polypaudio with gcc 2.95
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@754 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/modules/alsa-util.c4
-rw-r--r--src/modules/module-detect.c2
-rw-r--r--src/modules/module-jack-sink.c1
-rw-r--r--src/modules/module-oss.c3
-rw-r--r--src/modules/module-tunnel.c2
-rw-r--r--src/modules/rtp/module-rtp-recv.c2
-rw-r--r--src/polyp/browser.c2
-rw-r--r--src/polyp/context.c2
-rw-r--r--src/polyp/def.h2
-rw-r--r--src/polyp/stream.c2
-rw-r--r--src/polypcore/socket-client.c2
-rw-r--r--src/polypcore/source.c2
-rw-r--r--src/utils/pacmd.c2
13 files changed, 15 insertions, 13 deletions
diff --git a/src/modules/alsa-util.c b/src/modules/alsa-util.c
index 2f9be07a..dcc0e020 100644
--- a/src/modules/alsa-util.c
+++ b/src/modules/alsa-util.c
@@ -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;
diff --git a/src/modules/module-detect.c b/src/modules/module-detect.c
index 6b2e2742..9cc13e81 100644
--- a/src/modules/module-detect.c
+++ b/src/modules/module-detect.c
@@ -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 */
}
diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c
index 4f7a66eb..f340ab6d 100644
--- a/src/modules/module-jack-sink.c
+++ b/src/modules/module-jack-sink.c
@@ -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);
diff --git a/src/modules/module-oss.c b/src/modules/module-oss.c
index d9980d82..ccc3c7d9 100644
--- a/src/modules/module-oss.c
+++ b/src/modules/module-oss.c
@@ -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 */
diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c
index 70cc950c..b68bc485 100644
--- a/src/modules/module-tunnel.c
+++ b/src/modules/module-tunnel.c
@@ -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);
diff --git a/src/modules/rtp/module-rtp-recv.c b/src/modules/rtp/module-rtp-recv.c
index a714e162..cd5f10e6 100644
--- a/src/modules/rtp/module-rtp-recv.c
+++ b/src/modules/rtp/module-rtp-recv.c
@@ -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);
}
diff --git a/src/polyp/browser.c b/src/polyp/browser.c
index de5c751a..cef680e4 100644
--- a/src/polyp/browser.c
+++ b/src/polyp/browser.c
@@ -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);
diff --git a/src/polyp/context.c b/src/polyp/context.c
index 047b739f..448e2e68 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -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;
}
diff --git a/src/polyp/def.h b/src/polyp/def.h
index 80e3092b..517dd422 100644
--- a/src/polyp/def.h
+++ b/src/polyp/def.h
@@ -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 */
diff --git a/src/polyp/stream.c b/src/polyp/stream.c
index ce2470f6..e400415c 100644
--- a/src/polyp/stream.c
+++ b/src/polyp/stream.c
@@ -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"); */
diff --git a/src/polypcore/socket-client.c b/src/polypcore/socket-client.c
index 1ee19a59..7c4f4d6b 100644
--- a/src/polypcore/socket-client.c
+++ b/src/polypcore/socket-client.c
@@ -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:
diff --git a/src/polypcore/source.c b/src/polypcore/source.c
index 9e9415b6..3a78825b 100644
--- a/src/polypcore/source.c
+++ b/src/polypcore/source.c
@@ -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;
diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c
index a71e0e93..e640ddaf 100644
--- a/src/utils/pacmd.c
+++ b/src/utils/pacmd.c
@@ -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;