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

Cleanup: fixed some compiler warnings

This commit is contained in:
Philipp Schafft 2015-11-28 11:30:34 +00:00
parent d51b9afc49
commit 24bc25ec38
12 changed files with 31 additions and 3 deletions

View File

@ -243,6 +243,8 @@ static auth_result auth_remove_client(auth_t *auth, auth_client *auth_user)
client_t *client = auth_user->client;
auth_result ret = AUTH_RELEASED;
(void)auth;
if (client->auth->release_client)
ret = client->auth->release_client(auth_user);

View File

@ -22,11 +22,13 @@
static auth_result anonymous_auth(auth_client *auth_user)
{
(void)auth_user;
return AUTH_OK;
}
int auth_get_anonymous_auth(auth_t *authenticator, config_options_t *options)
{
(void)options;
authenticator->authenticate_client = anonymous_auth;
authenticator->immediate = 1;
return 0;

View File

@ -89,6 +89,8 @@ static int compare_users(void *arg, void *a, void *b)
htpasswd_user *user1 = (htpasswd_user *)a;
htpasswd_user *user2 = (htpasswd_user *)b;
(void)arg;
return strcmp (user1->name, user2->name);
}

View File

@ -24,6 +24,7 @@ static int my_getpass(void *client, char *prompt, char *buffer, int buflen) {
#endif
static size_t handle_returned (void *ptr, size_t size, size_t nmemb, void *stream) {
(void)ptr, (void)stream;
return size * nmemb;
}

View File

@ -152,6 +152,8 @@ static inline void _try_registrations(event_registration_t *er, event_t *event)
static void *event_run_thread (void *arg) {
int running = 0;
(void)arg;
do {
event_t *event;
size_t i;

View File

@ -27,6 +27,7 @@ typedef struct event_url {
} event_url_t;
static size_t handle_returned (void *ptr, size_t size, size_t nmemb, void *stream) {
(void)ptr, (void)stream;
return size * nmemb;
}

View File

@ -292,7 +292,7 @@ int format_advance_queue(source_t *source, client_t *client)
*/
static int format_prepare_headers (source_t *source, client_t *client)
{
unsigned remaining;
size_t remaining;
char *ptr;
int bytes;
int bitrate_filtered = 0;
@ -303,11 +303,11 @@ static int format_prepare_headers (source_t *source, client_t *client)
client->respcode = 200;
bytes = util_http_build_header(ptr, remaining, 0, 0, 200, NULL, source->format->contenttype, NULL, NULL, source, client);
if (bytes == -1) {
if (bytes < 0) {
ICECAST_LOG_ERROR("Dropping client as we can not build response headers.");
client->respcode = 500;
return -1;
} else if ((bytes + 1024) >= remaining) { /* we don't know yet how much to follow but want at least 1kB free space */
} else if (((size_t)bytes + (size_t)1024U) >= remaining) { /* we don't know yet how much to follow but want at least 1kB free space */
void *new_ptr = realloc(ptr, bytes + 1024);
if (new_ptr) {
ICECAST_LOG_DEBUG("Client buffer reallocation succeeded.");

View File

@ -275,6 +275,8 @@ static void *fserv_thread_function(void *arg)
fserve_t *fclient, **trail;
size_t bytes;
(void)arg;
while (1)
{
if (wait_for_fds() < 0)
@ -716,6 +718,7 @@ static int _delete_mapping(void *mapping) {
static int _compare_mappings(void *arg, void *a, void *b)
{
(void)arg;
return strcmp(
((mime_type *)a)->ext,
((mime_type *)b)->ext);

View File

@ -43,6 +43,7 @@ static int __func_free(void *x) {
}
static int __func_compare (void *arg, void *a, void *b) {
(void)arg;
return strcmp(b, a);
}

View File

@ -724,6 +724,8 @@ static void *_slave_thread(void *arg)
ice_config_t *config;
unsigned int interval = 0;
(void)arg;
thread_mutex_lock(&_slave_mutex);
update_settings = 0;
update_all_mounts = 0;

View File

@ -191,6 +191,8 @@ int source_compare_sources(void *arg, void *a, void *b)
source_t *srca = (source_t *)a;
source_t *srcb = (source_t *)b;
(void)arg;
return strcmp(srca->mount, srcb->mount);
}
@ -934,6 +936,8 @@ static int _compare_clients(void *compare_arg, void *a, void *b)
client_t *clienta = (client_t *) a;
client_t *clientb = (client_t *) b;
(void)compare_arg;
connection_t *cona = clienta->con;
connection_t *conb = clientb->con;

View File

@ -671,6 +671,8 @@ static void *_stats_thread(void *arg)
stats_event_t *copy;
event_listener_t *listener;
(void)arg;
stats_event_time (NULL, "server_start");
stats_event_time_iso8601 (NULL, "server_start_iso8601");
@ -995,6 +997,8 @@ void *stats_connection(void *arg)
void stats_callback (client_t *client, void *notused)
{
(void)notused;
if (client->con->error)
{
client_destroy (client);
@ -1078,6 +1082,8 @@ static int _compare_stats(void *arg, void *a, void *b)
stats_node_t *nodea = (stats_node_t *)a;
stats_node_t *nodeb = (stats_node_t *)b;
(void)arg;
return strcmp(nodea->name, nodeb->name);
}
@ -1086,6 +1092,8 @@ static int _compare_source_stats(void *arg, void *a, void *b)
stats_source_t *nodea = (stats_source_t *)a;
stats_source_t *nodeb = (stats_source_t *)b;
(void)arg;
return strcmp(nodea->source, nodeb->source);
}