diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c index ab6a6f9..0c96a4a 100644 --- a/alsactl/init_parse.c +++ b/alsactl/init_parse.c @@ -136,7 +136,7 @@ static void free_space(struct space *space) free(space); } -struct pair *value_find(struct space *space, const char *key) +static struct pair *value_find(struct space *space, const char *key) { struct pair *pair = space->pairs; diff --git a/alsactl/state.c b/alsactl/state.c index 355f242..467fa93 100644 --- a/alsactl/state.c +++ b/alsactl/state.c @@ -34,7 +34,7 @@ #define ARRAY_SIZE(a) (sizeof (a) / sizeof (a)[0]) -char *id_str(snd_ctl_elem_id_t *id) +static char *id_str(snd_ctl_elem_id_t *id) { static char str[128]; assert(id); @@ -47,7 +47,7 @@ char *id_str(snd_ctl_elem_id_t *id) return str; } -char *num_str(long n) +static char *num_str(long n) { static char str[32]; sprintf(str, "%ld", n); diff --git a/amidi/amidi.c b/amidi/amidi.c index bf95a32..82eeff4 100644 --- a/amidi/amidi.c +++ b/amidi/amidi.c @@ -445,7 +445,7 @@ static void sig_handler(int dummy) stop = 1; } -void add_send_hex_data(const char *str) +static void add_send_hex_data(const char *str) { int length; char *s; diff --git a/amixer/amixer.c b/amixer/amixer.c index f93fa9e..d5a77ba 100644 --- a/amixer/amixer.c +++ b/amixer/amixer.c @@ -1665,7 +1665,7 @@ static void events_remove(snd_hctl_elem_t *helem) printf("\n"); } -int element_callback(snd_hctl_elem_t *elem, unsigned int mask) +static int element_callback(snd_hctl_elem_t *elem, unsigned int mask) { if (mask == SND_CTL_EVENT_MASK_REMOVE) { events_remove(elem); @@ -1689,7 +1689,7 @@ static void events_add(snd_hctl_elem_t *helem) snd_hctl_elem_set_callback(helem, element_callback); } -int ctl_callback(snd_hctl_t *ctl, unsigned int mask, +static int ctl_callback(snd_hctl_t *ctl, unsigned int mask, snd_hctl_elem_t *elem) { if (mask & SND_CTL_EVENT_MASK_ADD) @@ -1743,7 +1743,7 @@ static void sevents_remove(snd_mixer_selem_id_t *sid) printf("event remove: '%s',%i\n", snd_mixer_selem_id_get_name(sid), snd_mixer_selem_id_get_index(sid)); } -int melem_event(snd_mixer_elem_t *elem, unsigned int mask) +static int melem_event(snd_mixer_elem_t *elem, unsigned int mask) { snd_mixer_selem_id_t *sid; snd_mixer_selem_id_alloca(&sid); @@ -1768,7 +1768,7 @@ static void sevents_add(snd_mixer_elem_t *elem) snd_mixer_elem_set_callback(elem, melem_event); } -int mixer_event(snd_mixer_t *mixer, unsigned int mask, +static int mixer_event(snd_mixer_t *mixer, unsigned int mask, snd_mixer_elem_t *elem) { if (mask & SND_CTL_EVENT_MASK_ADD) diff --git a/aplay/aplay.c b/aplay/aplay.c index c1924e0..9960f86 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -127,7 +127,7 @@ static void end_wave(int fd); static void begin_au(int fd, size_t count); static void end_au(int fd); -struct fmt_capture { +static const struct fmt_capture { void (*start) (int fd, size_t count); void (*end) (int fd); char *what; @@ -663,7 +663,7 @@ int main(int argc, char *argv[]) * Safe read (for pipes) */ -ssize_t safe_read(int fd, void *buf, size_t count) +static ssize_t safe_read(int fd, void *buf, size_t count) { ssize_t result = 0, res; @@ -701,7 +701,7 @@ static int test_vocfile(void *buffer) * helper for test_wavefile */ -size_t test_wavefile_read(int fd, u_char *buffer, size_t *size, size_t reqsize, int line) +static size_t test_wavefile_read(int fd, u_char *buffer, size_t *size, size_t reqsize, int line) { if (*size >= reqsize) return *size; @@ -2129,7 +2129,7 @@ static void header(int rtype, char *name) /* playing raw data */ -void playback_go(int fd, size_t loaded, off64_t count, int rtype, char *name) +static void playback_go(int fd, size_t loaded, off64_t count, int rtype, char *name) { int l, r; off64_t written = 0; @@ -2369,7 +2369,7 @@ static void capture(char *orig_name) } while ((file_type == FORMAT_RAW && !timelimit) || count > 0); } -void playbackv_go(int* fds, unsigned int channels, size_t loaded, off64_t count, int rtype, char **names) +static void playbackv_go(int* fds, unsigned int channels, size_t loaded, off64_t count, int rtype, char **names) { int r; size_t vsize; @@ -2421,7 +2421,7 @@ void playbackv_go(int* fds, unsigned int channels, size_t loaded, off64_t count, snd_pcm_nonblock(handle, nonblock); } -void capturev_go(int* fds, unsigned int channels, off64_t count, int rtype, char **names) +static void capturev_go(int* fds, unsigned int channels, off64_t count, int rtype, char **names) { size_t c; ssize_t r;