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
This commit is contained in:
Lennart Poettering 2006-04-18 19:31:50 +00:00
parent 60008cb115
commit 746adcfed5
13 changed files with 15 additions and 13 deletions

View 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;

View 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 */
}

View 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);

View 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 */

View 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);

View 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);
}