mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Get rid of some unused-function compiler warnings
This commit is contained in:
parent
3f6eb652cb
commit
53695b83dc
5 changed files with 11 additions and 5 deletions
|
|
@ -293,8 +293,8 @@ static int parse_resample_method(const char *filename, unsigned line, const char
|
||||||
return 0;
|
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
|
#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;
|
struct pa_rlimit *r = data;
|
||||||
|
|
||||||
pa_assert(filename);
|
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->is_set = k >= 0;
|
||||||
r->value = k >= 0 ? (rlim_t) 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;
|
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) {
|
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;
|
pa_daemon_conf *c = data;
|
||||||
|
|
|
||||||
|
|
@ -620,6 +620,7 @@ char *pa_strlcpy(char *b, const char *s, size_t l) {
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _POSIX_PRIORITY_SCHEDULING
|
||||||
static int set_scheduler(int rtprio) {
|
static int set_scheduler(int rtprio) {
|
||||||
#ifdef HAVE_SCHED_H
|
#ifdef HAVE_SCHED_H
|
||||||
struct sched_param sp;
|
struct sched_param sp;
|
||||||
|
|
@ -677,6 +678,7 @@ static int set_scheduler(int rtprio) {
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Make the current thread a realtime thread, and acquire the highest
|
/* Make the current thread a realtime thread, and acquire the highest
|
||||||
* rtprio we can get that is less or equal the specified parameter. If
|
* 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;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SYS_RESOURCE_H
|
||||||
static int set_nice(int nice_level) {
|
static int set_nice(int nice_level) {
|
||||||
#ifdef HAVE_DBUS
|
#ifdef HAVE_DBUS
|
||||||
DBusError error;
|
DBusError error;
|
||||||
|
|
@ -757,6 +760,7 @@ static int set_nice(int nice_level) {
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Raise the priority of the current process as much as possible that
|
/* Raise the priority of the current process as much as possible that
|
||||||
* is <= the specified nice level..*/
|
* is <= the specified nice level..*/
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,11 @@ pa_bool_t pa_memtrap_is_good(pa_memtrap *m) {
|
||||||
return !pa_atomic_load(&m->bad);
|
return !pa_atomic_load(&m->bad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_SIGACTION
|
||||||
static void sigsafe_error(const char *s) {
|
static void sigsafe_error(const char *s) {
|
||||||
(void) write(STDERR_FILENO, s, strlen(s));
|
(void) write(STDERR_FILENO, s, strlen(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_SIGACTION
|
|
||||||
static void signal_handler(int sig, siginfo_t* si, void *data) {
|
static void signal_handler(int sig, siginfo_t* si, void *data) {
|
||||||
unsigned j;
|
unsigned j;
|
||||||
pa_memtrap *m;
|
pa_memtrap *m;
|
||||||
|
|
|
||||||
|
|
@ -90,10 +90,12 @@ struct shm_marker {
|
||||||
|
|
||||||
#define SHM_MARKER_SIZE PA_ALIGN(sizeof(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) {
|
static char *segment_name(char *fn, size_t l, unsigned id) {
|
||||||
pa_snprintf(fn, l, "/pulse-shm-%u", id);
|
pa_snprintf(fn, l, "/pulse-shm-%u", id);
|
||||||
return fn;
|
return fn;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
|
int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
|
||||||
char fn[32];
|
char fn[32];
|
||||||
|
|
|
||||||
|
|
@ -604,6 +604,7 @@ static void stream_update_timing_callback(pa_stream *s, int success, void *userd
|
||||||
fprintf(stderr, " \r");
|
fprintf(stderr, " \r");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SIGUSR1
|
||||||
/* Someone requested that the latency is shown */
|
/* Someone requested that the latency is shown */
|
||||||
static void sigusr1_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
|
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));
|
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) {
|
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) {
|
if (stream && pa_stream_get_state(stream) == PA_STREAM_READY) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue