Silence warnings

This commit is contained in:
twinaphex 2019-07-09 09:36:46 +02:00
parent 419e8b1a35
commit e9b1a49c42
1 changed files with 2 additions and 7 deletions

View File

@ -3034,31 +3034,26 @@ error:
} }
#endif #endif
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
static void input_remote_free(input_remote_t *handle, unsigned max_users) static void input_remote_free(input_remote_t *handle, unsigned max_users)
{ {
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
unsigned user; unsigned user;
for(user = 0; user < max_users; user ++) for(user = 0; user < max_users; user ++)
socket_close(handle->net_fd[user]); socket_close(handle->net_fd[user]);
#endif
free(handle); free(handle);
} }
static input_remote_t *input_remote_new(uint16_t port, unsigned max_users) static input_remote_t *input_remote_new(uint16_t port, unsigned max_users)
{ {
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
unsigned user; unsigned user;
settings_t *settings = configuration_settings; settings_t *settings = configuration_settings;
#endif
input_remote_t *handle = (input_remote_t*) input_remote_t *handle = (input_remote_t*)
calloc(1, sizeof(*handle)); calloc(1, sizeof(*handle));
if (!handle) if (!handle)
return NULL; return NULL;
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
for(user = 0; user < max_users; user ++) for(user = 0; user < max_users; user ++)
{ {
handle->net_fd[user] = -1; handle->net_fd[user] = -1;
@ -3069,10 +3064,10 @@ static input_remote_t *input_remote_new(uint16_t port, unsigned max_users)
return NULL; return NULL;
} }
} }
#endif
return handle; return handle;
} }
#endif
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD) #if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
static void input_remote_parse_packet(struct remote_message *msg, unsigned user) static void input_remote_parse_packet(struct remote_message *msg, unsigned user)