sad

simple audio daemon
git clone git://git.2f30.org/sad
Log | Files | Refs | LICENSE

commit e23111d682e7577e34ac5a8b702b685bee97ede0
parent 36abc4aa8310ef4a6dcaef1cc94d516e6b86ee74
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 26 Dec 2014 00:28:27 +0100

fix a few warnings

Diffstat:
Mcmd.c | 4++--
Mplaylist.c | 1+
Msad.c | 7+++++--
Msndio.c | 1+
Mwav.c | 1+
5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/cmd.c b/cmd.c @@ -1,5 +1,6 @@ #include <sys/select.h> +#include <err.h> #include <fcntl.h> #include <limits.h> #include <signal.h> @@ -61,7 +62,6 @@ static void cmdpause(int fd, int argc, char **argv) { Song *s; - int i; int pause; if (argc != 2) { @@ -100,7 +100,7 @@ static void cmdplay(int fd, int argc, char **argv) { Song *s, *cur; - int id, i; + int id; if (argc != 2) { dprintf(fd, "ERR \"usage: play songid\"\n"); diff --git a/playlist.c b/playlist.c @@ -12,6 +12,7 @@ static int rollingid; int initplaylist(void) { + return 0; } Song * diff --git a/sad.c b/sad.c @@ -1,5 +1,6 @@ #include <sys/select.h> #include <sys/socket.h> +#include <sys/types.h> #include <sys/un.h> #include <err.h> @@ -22,7 +23,8 @@ static int servlisten(const char *name) { struct sockaddr_un sun; - int listenfd, r, len; + int listenfd, r; + socklen_t len; listenfd = socket(AF_UNIX, SOCK_STREAM, 0); if (listenfd < 0) @@ -50,7 +52,8 @@ static int servaccept(int listenfd) { struct sockaddr_un sun; - int clifd, len; + int clifd; + socklen_t len; len = sizeof(sun); clifd = accept(listenfd, (struct sockaddr *)&sun, &len); diff --git a/sndio.c b/sndio.c @@ -78,6 +78,7 @@ sndioclose(void) sio_close(hdl); hdl = NULL; puts("Closed sndio output"); + return 0; } Output sndiooutput = { diff --git a/wav.c b/wav.c @@ -1,5 +1,6 @@ #include <sys/select.h> +#include <err.h> #include <limits.h> #include <stdio.h> #include <sndfile.h>