Silence warnings - remove unused variables

This commit is contained in:
Twinaphex 2016-12-19 23:19:59 +01:00
parent 25fcfb47c7
commit 1d36c5effa
4 changed files with 7 additions and 15 deletions

View File

@ -108,8 +108,6 @@ static bool get_self_input_state(netplay_t *netplay)
if (!input_driver_is_libretro_input_blocked() && netplay->self_frame_count > 0)
{
settings_t *settings = config_get_ptr();
/* First frame we always give zero input since relying on
* input from first frame screws up when we use -F 0. */
retro_input_state_t cb = netplay->cbs.state_cb;
@ -801,7 +799,6 @@ static void netplay_toggle_play_spectate(netplay_t *netplay)
else
{
uint32_t cmd;
size_t i;
if (netplay->self_mode == NETPLAY_CONNECTION_PLAYING)
{

View File

@ -268,7 +268,6 @@ static void handshake_password(void *ignore, const char *line)
{
struct password_buf_s password_buf;
char password[8+NETPLAY_PASS_LEN]; /* 8 for salt, 128 for password */
uint32_t cmd[2];
netplay_t *netplay = handshake_password_netplay;
struct netplay_connection *connection = &netplay->connections[0];
@ -415,7 +414,6 @@ error:
static void netplay_handshake_ready(netplay_t *netplay, struct netplay_connection *connection)
{
size_t i;
char msg[512];
if (netplay->is_server)
@ -837,7 +835,6 @@ bool netplay_handshake_pre_sync(netplay_t *netplay,
uint32_t local_sram_size, remote_sram_size;
size_t i;
ssize_t recvd;
settings_t *settings = config_get_ptr();
retro_ctx_controller_info_t pad;
char new_nick[NETPLAY_NICK_LEN];
retro_ctx_memory_info_t mem_info;

View File

@ -312,7 +312,6 @@ bool netplay_init_serialization(netplay_t *netplay)
bool netplay_try_init_serialization(netplay_t *netplay)
{
retro_ctx_serialize_info_t serial_info;
size_t packet_buffer_size;
if (netplay->state_size)
return true;
@ -368,8 +367,6 @@ bool netplay_wait_and_init_serialization(netplay_t *netplay)
static bool netplay_init_buffers(netplay_t *netplay)
{
size_t packet_buffer_size;
if (!netplay)
return false;

View File

@ -379,6 +379,13 @@ bool netplay_cmd_mode(netplay_t *netplay,
return netplay_send_raw_cmd(netplay, connection, cmd, NULL, 0);
}
#undef RECV
#define RECV(buf, sz) \
recvd = netplay_recv(&connection->recv_packet_buffer, connection->fd, (buf), \
(sz), false); \
if (recvd >= 0 && recvd < (sz)) goto shrt; \
else if (recvd < 0)
static bool netplay_get_cmd(netplay_t *netplay,
struct netplay_connection *connection, bool *had_input)
{
@ -392,12 +399,6 @@ static bool netplay_get_cmd(netplay_t *netplay,
if (connection->mode < NETPLAY_CONNECTION_CONNECTED)
return netplay_handshake(netplay, connection, had_input);
#define RECV(buf, sz) \
recvd = netplay_recv(&connection->recv_packet_buffer, connection->fd, (buf), \
(sz), false); \
if (recvd >= 0 && recvd < (sz)) goto shrt; \
else if (recvd < 0)
RECV(&cmd, sizeof(cmd))
return false;