From 1f0961368f58a9fec319d86c79a86a9f0d008cf5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Jan 2006 01:17:39 +0000 Subject: * remove a lot of compiler warnings introduced by using some new GCC flags * add typedefs for public structs and enums and drop the struct/enum prefixs from all uses where it makes sense git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@447 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/cpulimit.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'polyp/cpulimit.c') diff --git a/polyp/cpulimit.c b/polyp/cpulimit.c index 53920f50..a834b094 100644 --- a/polyp/cpulimit.c +++ b/polyp/cpulimit.c @@ -23,6 +23,10 @@ #include #endif +#include "cpulimit.h" +#include "util.h" +#include "log.h" + #ifdef HAVE_SIGXCPU #include @@ -37,11 +41,6 @@ #include #endif -#include "cpulimit.h" -#include "util.h" -#include "log.h" - - /* This module implements a watchdog that makes sure that the current * process doesn't consume more than 70% CPU time for 10 seconds. This * is very useful when using SCHED_FIFO scheduling which effectively @@ -70,8 +69,8 @@ static time_t last_time = 0; static int the_pipe[2] = {-1, -1}; /* Main event loop and IO event for the FIFO */ -static struct pa_mainloop_api *api = NULL; -static struct pa_io_event *io_event = NULL; +static pa_mainloop_api *api = NULL; +static pa_io_event *io_event = NULL; /* Saved sigaction struct for SIGXCPU */ static struct sigaction sigaction_prev; @@ -153,7 +152,7 @@ static void signal_handler(int sig) { } /* Callback for IO events on the FIFO */ -static void callback(struct pa_mainloop_api*m, struct pa_io_event*e, int fd, enum pa_io_event_flags f, void *userdata) { +static void callback(pa_mainloop_api*m, pa_io_event*e, int fd, pa_io_event_flags f, void *userdata) { char c; assert(m && e && f == PA_IO_EVENT_INPUT && e == io_event && fd == the_pipe[0]); read(the_pipe[0], &c, sizeof(c)); @@ -161,7 +160,7 @@ static void callback(struct pa_mainloop_api*m, struct pa_io_event*e, int fd, enu } /* Initializes CPU load limiter */ -int pa_cpu_limit_init(struct pa_mainloop_api *m) { +int pa_cpu_limit_init(pa_mainloop_api *m) { struct sigaction sa; assert(m && !api && !io_event && the_pipe[0] == -1 && the_pipe[1] == -1 && !installed); @@ -227,9 +226,7 @@ void pa_cpu_limit_done(void) { #else /* HAVE_SIGXCPU */ -struct pa_mainloop_api; - -int pa_cpu_limit_init(struct pa_mainloop_api *m) { +int pa_cpu_limit_init(PA_GCC_UNUSED pa_mainloop_api *m) { return 0; } -- cgit