]> code.delx.au - pulseaudio/commitdiff
Get rid of some unused-function compiler warnings
authorMaarten Bosmans <mkbosmans@gmail.com>
Wed, 2 Mar 2011 11:41:23 +0000 (12:41 +0100)
committerColin Guthrie <cguthrie@mandriva.org>
Wed, 2 Mar 2011 14:52:46 +0000 (14:52 +0000)
src/daemon/daemon-conf.c
src/pulsecore/core-util.c
src/pulsecore/memtrap.c
src/pulsecore/shm.c
src/utils/pacat.c

index 3339f3b012e5136de615804cb755bd76fe148d86..e38e67ad48fdfa097638de2fcd8068a5222f0ae3 100644 (file)
@@ -293,8 +293,8 @@ static int parse_resample_method(const char *filename, unsigned line, const char
     return 0;
 }
 
-static int parse_rlimit(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
 #ifdef HAVE_SYS_RESOURCE_H
+static int parse_rlimit(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
     struct pa_rlimit *r = data;
 
     pa_assert(filename);
@@ -315,12 +315,10 @@ static int parse_rlimit(const char *filename, unsigned line, const char *section
         r->is_set = k >= 0;
         r->value = k >= 0 ? (rlim_t) k : 0;
     }
-#else
-    pa_log_warn(_("[%s:%u] rlimit not supported on this platform."), filename, line);
-#endif
 
     return 0;
 }
+#endif
 
 static int parse_sample_format(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
     pa_daemon_conf *c = data;
index 8a377e379bf9251f3888b8ab2aad4424ab256157..02e9bf631ee452aa31a2726dee8ec0bf71d6fd25 100644 (file)
@@ -620,6 +620,7 @@ char *pa_strlcpy(char *b, const char *s, size_t l) {
     return b;
 }
 
+#ifdef _POSIX_PRIORITY_SCHEDULING
 static int set_scheduler(int rtprio) {
 #ifdef HAVE_SCHED_H
     struct sched_param sp;
@@ -677,6 +678,7 @@ static int set_scheduler(int rtprio) {
 
     return -1;
 }
+#endif
 
 /* Make the current thread a realtime thread, and acquire the highest
  * rtprio we can get that is less or equal the specified parameter. If
@@ -713,6 +715,7 @@ int pa_make_realtime(int rtprio) {
     return -1;
 }
 
+#ifdef HAVE_SYS_RESOURCE_H
 static int set_nice(int nice_level) {
 #ifdef HAVE_DBUS
     DBusError error;
@@ -757,6 +760,7 @@ static int set_nice(int nice_level) {
 
     return -1;
 }
+#endif
 
 /* Raise the priority of the current process as much as possible that
  * is <= the specified nice level..*/
index b56d806adaaab3b7dbcf099b28c80fa8b8ad41a6..4df1fb715cacf0dacc4ce4906bf0d707c1a23344 100644 (file)
@@ -67,11 +67,11 @@ pa_bool_t pa_memtrap_is_good(pa_memtrap *m) {
     return !pa_atomic_load(&m->bad);
 }
 
+#ifdef HAVE_SIGACTION
 static void sigsafe_error(const char *s) {
     (void) write(STDERR_FILENO, s, strlen(s));
 }
 
-#ifdef HAVE_SIGACTION
 static void signal_handler(int sig, siginfo_t* si, void *data) {
     unsigned j;
     pa_memtrap *m;
index 5d5d85ab2d24cdb44c85f0dd8e98188be895e7ce..da8aff70dc6e7d2b56f0bd2c9169dc1c8245dc3b 100644 (file)
@@ -90,10 +90,12 @@ struct shm_marker {
 
 #define SHM_MARKER_SIZE PA_ALIGN(sizeof(struct shm_marker))
 
+#ifdef HAVE_SHM_OPEN
 static char *segment_name(char *fn, size_t l, unsigned id) {
     pa_snprintf(fn, l, "/pulse-shm-%u", id);
     return fn;
 }
+#endif
 
 int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
     char fn[32];
index 79936fd70f58b311ccabcd09474850a047f74055..6cd01d211b7fde74bba9e7a1ebd27558ff4b475b 100644 (file)
@@ -604,6 +604,7 @@ static void stream_update_timing_callback(pa_stream *s, int success, void *userd
     fprintf(stderr, "        \r");
 }
 
+#ifdef SIGUSR1
 /* Someone requested that the latency is shown */
 static void sigusr1_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
 
@@ -612,6 +613,7 @@ static void sigusr1_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int s
 
     pa_operation_unref(pa_stream_update_timing_info(stream, stream_update_timing_callback, NULL));
 }
+#endif
 
 static void time_event_callback(pa_mainloop_api *m, pa_time_event *e, const struct timeval *t, void *userdata) {
     if (stream && pa_stream_get_state(stream) == PA_STREAM_READY) {