[xiph-commits] r12597 - in trunk/ezstream: . src

moritz at svn.xiph.org moritz at svn.xiph.org
Thu Mar 1 06:50:19 PST 2007


Author: moritz
Date: 2007-03-01 06:50:14 -0800 (Thu, 01 Mar 2007)
New Revision: 12597

Modified:
   trunk/ezstream/configure.in
   trunk/ezstream/src/ezstream.c
   trunk/ezstream/src/playlist.c
   trunk/ezstream/src/strlcat.c
   trunk/ezstream/src/strlcpy.c
   trunk/ezstream/src/util.c
Log:
Enable more warnings on gcc, and do some miscellaneous cleanups.


Modified: trunk/ezstream/configure.in
===================================================================
--- trunk/ezstream/configure.in	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/configure.in	2007-03-01 14:50:14 UTC (rev 12597)
@@ -37,7 +37,7 @@
 		;;
 	esac
 else
-	XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith"
+	XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
 fi
 
 

Modified: trunk/ezstream/src/ezstream.c
===================================================================
--- trunk/ezstream/src/ezstream.c	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/src/ezstream.c	2007-03-01 14:50:14 UTC (rev 12597)
@@ -103,22 +103,6 @@
 volatile sig_atomic_t	 rereadPlaylist = 0;
 volatile sig_atomic_t	 rereadPlaylist_notify = 0;
 volatile sig_atomic_t	 skipTrack = 0;
-
-void
-sig_handler(int sig)
-{
-	switch (sig) {
-	case SIGHUP:
-		rereadPlaylist = 1;
-		rereadPlaylist_notify = 1;
-		break;
-	case SIGUSR1:
-		skipTrack = 1;
-		break;
-	default:
-		break;
-	}
-}
 #else
 int			 rereadPlaylist = 0;
 int			 rereadPlaylist_notify = 0;
@@ -135,6 +119,7 @@
 	char genre;
 } ID3Tag;
 
+void	sig_handler(int);
 #ifdef WIN32
 char *	basename(const char *);
 #endif
@@ -152,6 +137,22 @@
 void	usage(void);
 void	usageHelp(void);
 
+void
+sig_handler(int sig)
+{
+	switch (sig) {
+	case SIGHUP:
+		rereadPlaylist = 1;
+		rereadPlaylist_notify = 1;
+		break;
+	case SIGUSR1:
+		skipTrack = 1;
+		break;
+	default:
+		break;
+	}
+}
+
 #ifdef WIN32
 char *
 basename(const char *fileName)
@@ -225,7 +226,7 @@
 
 	p2 = strstr(p1, from);
 	if (p2 != NULL) {
-		if (p2 - p1 >= size) {
+		if ((unsigned int)(p2 - p1) >= size) {
 			printf("%s: replaceString(): Internal error: p2 - p1 >= size\n",
 			       __progname);
 			abort();

Modified: trunk/ezstream/src/playlist.c
===================================================================
--- trunk/ezstream/src/playlist.c	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/src/playlist.c	2007-03-01 14:50:14 UTC (rev 12597)
@@ -49,7 +49,6 @@
 # define PATH_MAX	256
 #endif
 
-extern int	errno;
 extern char    *__progname;
 
 struct playlist {

Modified: trunk/ezstream/src/strlcat.c
===================================================================
--- trunk/ezstream/src/strlcat.c	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/src/strlcat.c	2007-03-01 14:50:14 UTC (rev 12597)
@@ -24,6 +24,7 @@
 # include <sys/types.h>
 #endif
 #include <string.h>
+#include "strlfctns.h"
 
 /*
  * Appends src to string dst of size siz (unlike strncat, siz is the

Modified: trunk/ezstream/src/strlcpy.c
===================================================================
--- trunk/ezstream/src/strlcpy.c	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/src/strlcpy.c	2007-03-01 14:50:14 UTC (rev 12597)
@@ -24,6 +24,7 @@
 # include <sys/types.h>
 #endif
 #include <string.h>
+#include "strlfctns.h"
 
 /*
  * Copy src to string dst of size siz.  At most siz-1 characters

Modified: trunk/ezstream/src/util.c
===================================================================
--- trunk/ezstream/src/util.c	2007-03-01 01:22:06 UTC (rev 12596)
+++ trunk/ezstream/src/util.c	2007-03-01 14:50:14 UTC (rev 12597)
@@ -33,7 +33,6 @@
 # define SIZE_T_MAX	UINT_MAX
 #endif
 
-extern int	errno;
 extern char    *__progname;
 
 void *



More information about the commits mailing list