Commit c0320b08 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix: corrected some stuff reported by -Wextra

parent b52c219e
......@@ -68,6 +68,8 @@ static void close_module(input_module_t *mod)
static int event_handler(input_module_t *mod, enum event_type ev, void *param)
{
(void)param;
switch(ev)
{
case EVENT_SHUTDOWN:
......
......@@ -46,7 +46,7 @@ static void shuffle(char **buf, size_t len)
*/
do {
d = random();
} while (d > (RAND_MAX - (RAND_MAX % range)));
} while (d > (RAND_MAX - (long int)(RAND_MAX % range)));
/*
* The range starts at the item we want to shuffle, excluding
......@@ -220,6 +220,7 @@ char *playlist_basic_get_next_filename(void *data)
void playlist_basic_free_filename(void *data, char *fn)
{
(void)data;
free (fn);
}
......
......@@ -85,6 +85,7 @@ char *playlist_script_get_filename(void *data) {
void playlist_script_free_filename(void *data, char *fn)
{
(void)data;
free(fn);
}
......
......@@ -34,6 +34,8 @@ extern volatile int metadata_update_signalled;
void signal_usr1_handler(int signum)
{
(void)signum;
LOG_INFO0("Metadata update requested");
metadata_update_signalled = 1;
thread_cond_broadcast(&ices_config->event_pending_cond);
......@@ -45,6 +47,8 @@ void signal_usr1_handler(int signum)
#ifndef _WIN32
void signal_hup_handler(int signum)
{
(void)signum;
LOG_INFO0("Flushing logs");
log_flush(ices_config->log_id);
......@@ -57,6 +61,8 @@ void signal_hup_handler(int signum)
void signal_int_handler(int signum)
{
(void)signum;
/* Is a mutex needed here? Probably */
if (!ices_config->shutdown)
{
......
......@@ -32,14 +32,14 @@
#define MODULE "stream-shared/"
#include "logging.h"
int stream_send_data(stream_description *s, unsigned char *buf,
unsigned long len)
ssize_t stream_send_data(stream_description *s, unsigned char *buf,
size_t len)
{
int ret;
ssize_t ret;
if(s->stream->savefile)
{
int ret = fwrite(buf, 1, len, s->stream->savefile);
size_t ret = fwrite(buf, 1, len, s->stream->savefile);
if(ret != len)
LOG_ERROR1("Failed to write %d bytes to savefile", len);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment