* 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
This commit is contained in:
Lennart Poettering 2006-01-11 01:17:39 +00:00
parent 6c512fb5a3
commit 1f0961368f
200 changed files with 3582 additions and 3468 deletions

View file

@ -23,6 +23,10 @@
#include <config.h>
#endif
#include "cpulimit.h"
#include "util.h"
#include "log.h"
#ifdef HAVE_SIGXCPU
#include <errno.h>
@ -37,11 +41,6 @@
#include <sys/resource.h>
#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;
}