From 5818a2c63e9a52a545b9c8eb6fdbfa24cfee822f Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Thu, 23 Jun 2011 22:21:03 +0200 Subject: win32: Make some unused-variable warnings go away --- src/daemon/daemon-conf.c | 11 +++++++---- src/daemon/main.c | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/daemon') diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 67b772ae..bb929091 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -470,6 +470,10 @@ static int parse_nice_level(const char *filename, unsigned line, const char *sec } static int parse_rtprio(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) { +#ifdef OS_IS_WIN32 + pa_log("[%s:%u] Realtime priority not available on win32.", filename, line); +#else +# ifdef HAVE_SCHED_H pa_daemon_conf *c = data; int32_t rtprio; @@ -478,16 +482,15 @@ static int parse_rtprio(const char *filename, unsigned line, const char *section pa_assert(rvalue); pa_assert(data); -#ifndef OS_IS_WIN32 -# ifdef HAVE_SCHED_H if (pa_atoi(rvalue, &rtprio) < 0 || rtprio < sched_get_priority_min(SCHED_FIFO) || rtprio > sched_get_priority_max(SCHED_FIFO)) { pa_log("[%s:%u] Invalid realtime priority '%s'.", filename, line, rvalue); return -1; } -# endif -#endif c->realtime_priority = (int) rtprio; +# endif +#endif /* OS_IS_WIN32 */ + return 0; } diff --git a/src/daemon/main.c b/src/daemon/main.c index 90ed5ce0..94c87d15 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -748,7 +748,9 @@ int main(int argc, char *argv[]) { } if (conf->daemonize) { +#ifdef HAVE_FORK pid_t child; +#endif if (pa_stdio_acquire() < 0) { pa_log(_("Failed to acquire stdio.")); -- cgit