mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-27 06:33:21 -05:00
Fix various trivial compiler warnings
This commit is contained in:
parent
ea36855793
commit
7098dfbab3
3
src/io.c
3
src/io.c
@ -323,7 +323,7 @@ int io_urldecode(char *str) {
|
|||||||
switch(*current) {
|
switch(*current) {
|
||||||
case '+':
|
case '+':
|
||||||
*dst++ = ' ';
|
*dst++ = ' ';
|
||||||
*current++;
|
current++;
|
||||||
break;
|
break;
|
||||||
case '%':
|
case '%':
|
||||||
/* This is rather brute force. Maybe sscanf? */
|
/* This is rather brute force. Maybe sscanf? */
|
||||||
@ -2078,7 +2078,6 @@ int io_socket_write(IO_PRIVHANDLE *phandle, unsigned char *buf,uint32_t *len) {
|
|||||||
ssize_t byteswritten=0;
|
ssize_t byteswritten=0;
|
||||||
uint32_t totalbytes;
|
uint32_t totalbytes;
|
||||||
unsigned char *bufp;
|
unsigned char *bufp;
|
||||||
long blocking = 0;
|
|
||||||
|
|
||||||
ASSERT(phandle);
|
ASSERT(phandle);
|
||||||
ASSERT(phandle->private);
|
ASSERT(phandle->private);
|
||||||
|
@ -344,6 +344,7 @@ void plugin_handler(WS_CONNINFO *pwsc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pi_log(E_DBG,"Tokenizing url\n");
|
pi_log(E_DBG,"Tokenizing url\n");
|
||||||
|
save = NULL;
|
||||||
while((ppi->uri_count < 10) && (token=strtok_r(string,"/",&save))) {
|
while((ppi->uri_count < 10) && (token=strtok_r(string,"/",&save))) {
|
||||||
string=NULL;
|
string=NULL;
|
||||||
ppi->uri_sections[ppi->uri_count++] = token;
|
ppi->uri_sections[ppi->uri_count++] = token;
|
||||||
|
@ -197,6 +197,7 @@ void plugin_handler(WS_CONNINFO *pwsc) {
|
|||||||
memset((void*)&ppi->dq,0,sizeof(DB_QUERY));
|
memset((void*)&ppi->dq,0,sizeof(DB_QUERY));
|
||||||
|
|
||||||
pi_log(E_DBG,"Tokenizing url\n");
|
pi_log(E_DBG,"Tokenizing url\n");
|
||||||
|
save = NULL;
|
||||||
while((ppi->uri_count < 10) && (token=strtok_r(string,"/",&save))) {
|
while((ppi->uri_count < 10) && (token=strtok_r(string,"/",&save))) {
|
||||||
string=NULL;
|
string=NULL;
|
||||||
ppi->uri_sections[ppi->uri_count++] = token;
|
ppi->uri_sections[ppi->uri_count++] = token;
|
||||||
|
@ -223,7 +223,7 @@ int ssc_ffmpeg_open(void *vp, MP3FILE *pmp3) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strncmp(id3.id,"ID3",3)==0) {
|
if(strncmp((char *)id3.id,"ID3",3)==0) {
|
||||||
/* found an ID3 header... */
|
/* found an ID3 header... */
|
||||||
pi_log(E_DBG,"Found ID3 header\n");
|
pi_log(E_DBG,"Found ID3 header\n");
|
||||||
size = (id3.size[0] << 21 | id3.size[1] << 14 |
|
size = (id3.size[0] << 21 | id3.size[1] << 14 |
|
||||||
|
@ -146,7 +146,6 @@ RB_STATIC struct RB_ENTRY(tree) *RB_ENTRY(init)(void)
|
|||||||
#endif /* RB_CUSTOMIZE */
|
#endif /* RB_CUSTOMIZE */
|
||||||
{
|
{
|
||||||
struct RB_ENTRY(tree) *retval;
|
struct RB_ENTRY(tree) *retval;
|
||||||
char c;
|
|
||||||
|
|
||||||
if ((retval=(struct RB_ENTRY(tree) *) malloc(sizeof(struct RB_ENTRY(tree))))==NULL)
|
if ((retval=(struct RB_ENTRY(tree) *) malloc(sizeof(struct RB_ENTRY(tree))))==NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
* @returns TRUE if file should be added to DB, FALSE otherwise
|
* @returns TRUE if file should be added to DB, FALSE otherwise
|
||||||
*/
|
*/
|
||||||
int scan_get_mpcinfo(char *filename, MP3FILE *pmp3) {
|
int scan_get_mpcinfo(char *filename, MP3FILE *pmp3) {
|
||||||
FILE *f;
|
|
||||||
TagLib_File *file;
|
TagLib_File *file;
|
||||||
TagLib_Tag *tag;
|
TagLib_Tag *tag;
|
||||||
const TagLib_AudioProperties *properties;
|
const TagLib_AudioProperties *properties;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user