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;
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;
}
-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 */
}
char x;
assert(m);
+ assert(e);
assert(flags == PA_IO_EVENT_INPUT);
assert(u);
assert(u->pipe_fds[0] == fd);
* 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 */
}
#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);
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);
}
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);
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;
}
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 */
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"); */
goto finish;
fail:
- errno == EHOSTUNREACH;
+ errno = EHOSTUNREACH;
do_call(c);
finish:
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;
#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;