Recently Written · git

sad

sad (2f30.org simple audio daemon) with a Cygwin/OSS port on branch cygwin

git clone https://github.com/equwal/sad

Log | Files | Refs


commit b9e22d58aa5bf28af8d3c39e77bd274446e05323
sin <sin@2f30.org>
2014-12-27 18:15:40 +0000

Fix some warnings

 Makefile   | 2 +-
 cmd.c      | 4 ----
 fifo.c     | 2 ++
 mp3.c      | 2 +-
 playlist.c | 2 ++
 5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile b/Makefile
index 1a5f3c3..7277366 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@ VERSION = 0.0
 PREFIX = /usr/local
 MANPREFIX = $(PREFIX)/man
 
-CFLAGS = -I/usr/local/include -g
+CFLAGS = -I/usr/local/include -g -Wall
 LDFLAGS = -L /usr/local/lib
 LDLIBS = -lsndfile -lmpg123 -lsndio -lvorbisfile
 
diff --git a/cmd.c b/cmd.c
index 56a02b8..0049365 100644
--- a/cmd.c
+++ b/cmd.c
@@ -188,8 +188,6 @@ cmdadd(int fd, char *arg)
 static void
 cmdclear(int fd, char *arg)
 {
-	Song *s;
-
 	if (arg[0]) {
 		dprintf(fd, "ERR unexpected argument\n");
 		return;
@@ -293,8 +291,6 @@ docmd(int clifd)
 	size_t cmdlen;
 	char   *new_buf;
 	int     i, c;
-	int     argc;
-	char   *argv[2];
 
 	/* If no buffer, set it up.  */
 	if (!buf) {
diff --git a/fifo.c b/fifo.c
index 2851e60..2f77845 100644
--- a/fifo.c
+++ b/fifo.c
@@ -1,4 +1,6 @@
 #include <sys/select.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include <err.h>
 #include <fcntl.h>
diff --git a/mp3.c b/mp3.c
index bdee824..f52fb30 100644
--- a/mp3.c
+++ b/mp3.c
@@ -30,7 +30,7 @@ mp3open(const char *name)
 {
 	int  r;
 	long rate;
-	int  channels, encoding, bits;
+	int  channels, encoding;
 
 	r = mpg123_open(hdl, name);
 	if (r != MPG123_OK) {
diff --git a/playlist.c b/playlist.c
index d4ebce3..f934e83 100644
--- a/playlist.c
+++ b/playlist.c
@@ -174,6 +174,7 @@ playnextsong(void)
 	s = getnextsong();
 	s->state = PREPARE;
 	playlist.cursong = s;
+	return s;
 }
 
 Song *
@@ -186,6 +187,7 @@ playprevsong(void)
 	s = getprevsong();
 	s->state = PREPARE;
 	playlist.cursong = s;
+	return s;
 }
 
 void