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:
parent
ca6161358d
commit
2a511a64fc
@ -37,7 +37,7 @@ if test -z "$GCC"; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith"
|
XIPH_CPPFLAGS="-Wall -Wwrite-strings -Wpointer-arith -Wsign-compare -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,22 +103,6 @@ const int ezstream_signals[] = { SIGHUP, SIGUSR1 };
|
|||||||
volatile sig_atomic_t rereadPlaylist = 0;
|
volatile sig_atomic_t rereadPlaylist = 0;
|
||||||
volatile sig_atomic_t rereadPlaylist_notify = 0;
|
volatile sig_atomic_t rereadPlaylist_notify = 0;
|
||||||
volatile sig_atomic_t skipTrack = 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
|
#else
|
||||||
int rereadPlaylist = 0;
|
int rereadPlaylist = 0;
|
||||||
int rereadPlaylist_notify = 0;
|
int rereadPlaylist_notify = 0;
|
||||||
@ -135,6 +119,7 @@ typedef struct tag_ID3Tag {
|
|||||||
char genre;
|
char genre;
|
||||||
} ID3Tag;
|
} ID3Tag;
|
||||||
|
|
||||||
|
void sig_handler(int);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char * basename(const char *);
|
char * basename(const char *);
|
||||||
#endif
|
#endif
|
||||||
@ -152,6 +137,22 @@ char * getProgname(const char *);
|
|||||||
void usage(void);
|
void usage(void);
|
||||||
void usageHelp(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
|
#ifdef WIN32
|
||||||
char *
|
char *
|
||||||
basename(const char *fileName)
|
basename(const char *fileName)
|
||||||
@ -225,7 +226,7 @@ replaceString(const char *source, char *dest, size_t size,
|
|||||||
|
|
||||||
p2 = strstr(p1, from);
|
p2 = strstr(p1, from);
|
||||||
if (p2 != NULL) {
|
if (p2 != NULL) {
|
||||||
if (p2 - p1 >= size) {
|
if ((unsigned int)(p2 - p1) >= size) {
|
||||||
printf("%s: replaceString(): Internal error: p2 - p1 >= size\n",
|
printf("%s: replaceString(): Internal error: p2 - p1 >= size\n",
|
||||||
__progname);
|
__progname);
|
||||||
abort();
|
abort();
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
# define PATH_MAX 256
|
# define PATH_MAX 256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int errno;
|
|
||||||
extern char *__progname;
|
extern char *__progname;
|
||||||
|
|
||||||
struct playlist {
|
struct playlist {
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "strlfctns.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "strlfctns.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy src to string dst of size siz. At most siz-1 characters
|
* Copy src to string dst of size siz. At most siz-1 characters
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
# define SIZE_T_MAX UINT_MAX
|
# define SIZE_T_MAX UINT_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int errno;
|
|
||||||
extern char *__progname;
|
extern char *__progname;
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
Loading…
Reference in New Issue
Block a user