1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Enable more warnings on gcc, and do some miscellaneous cleanups.

git-svn-id: https://svn.xiph.org/trunk/ezstream@12597 0101bb08-14d6-0310-b084-bc0e0c8e3800
This commit is contained in:
moritz 2007-03-01 14:50:14 +00:00
parent ca6161358d
commit 2a511a64fc
6 changed files with 21 additions and 20 deletions

View File

@ -37,7 +37,7 @@ if test -z "$GCC"; then
;;
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

View File

@ -103,22 +103,6 @@ const int ezstream_signals[] = { SIGHUP, SIGUSR1 };
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 @@ typedef struct tag_ID3Tag {
char genre;
} ID3Tag;
void sig_handler(int);
#ifdef WIN32
char * basename(const char *);
#endif
@ -152,6 +137,22 @@ char * getProgname(const char *);
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 @@ replaceString(const char *source, char *dest, size_t size,
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();

View File

@ -49,7 +49,6 @@
# define PATH_MAX 256
#endif
extern int errno;
extern char *__progname;
struct playlist {

View File

@ -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

View File

@ -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

View File

@ -33,7 +33,6 @@
# define SIZE_T_MAX UINT_MAX
#endif
extern int errno;
extern char *__progname;
void *