Silence warnings

This commit is contained in:
Twinaphex 2017-03-06 12:11:47 +01:00
parent c7722143b9
commit 4b796ae740
4 changed files with 6 additions and 6 deletions

View File

@ -168,7 +168,7 @@ char *string_trim_whitespace(char *const s)
char *word_wrap(char* buffer, const char *string, int line_width) char *word_wrap(char* buffer, const char *string, int line_width)
{ {
unsigned i = 0; unsigned i = 0;
unsigned len = strlen(string); unsigned len = (unsigned)strlen(string);
while (i < len) while (i < len)
{ {

View File

@ -3448,7 +3448,7 @@ finish:
netplay_discovery_driver_ctl(RARCH_NETPLAY_DISCOVERY_CTL_LAN_GET_RESPONSES, &lan_hosts); netplay_discovery_driver_ctl(RARCH_NETPLAY_DISCOVERY_CTL_LAN_GET_RESPONSES, &lan_hosts);
#endif #endif
if (lan_hosts) if (lan_hosts)
lan_room_count = lan_hosts->size; lan_room_count = (int)lan_hosts->size;
netplay_rooms_parse(buf); netplay_rooms_parse(buf);

View File

@ -565,8 +565,8 @@ static void netplay_announce_cb(void *task_data, void *user_data, const char *er
{ {
RARCH_LOG("Joining MITM server: %s:%s\n", mitm_ip, mitm_port); RARCH_LOG("Joining MITM server: %s:%s\n", mitm_ip, mitm_port);
ip_len = strlen(mitm_ip); ip_len = (unsigned)strlen(mitm_ip);
port_len = strlen(mitm_port); port_len = (unsigned)strlen(mitm_port);
/* Enable Netplay client mode */ /* Enable Netplay client mode */
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))

View File

@ -106,7 +106,7 @@ static JSON_Parser_HandlerResult JSON_CALL StringHandler(JSON_Parser parser, cha
if (pCtx->cur_field && string_is_equal(pCtx->cur_field, "game_crc")) if (pCtx->cur_field && string_is_equal(pCtx->cur_field, "game_crc"))
{ {
/* CRC comes in as a string but it is stored as an unsigned casted to int */ /* CRC comes in as a string but it is stored as an unsigned casted to int */
*((int*)pCtx->cur_member) = strtoul(pValue, NULL, 16); *((int*)pCtx->cur_member) = (int)strtoul(pValue, NULL, 16);
} }
else if (pCtx->cur_field) else if (pCtx->cur_field)
strlcpy((char*)pCtx->cur_member, pValue, PATH_MAX_LENGTH); strlcpy((char*)pCtx->cur_member, pValue, PATH_MAX_LENGTH);
@ -126,7 +126,7 @@ static JSON_Parser_HandlerResult JSON_CALL NumberHandler(JSON_Parser parser, cha
{ {
if (pValue && length) if (pValue && length)
if (pCtx->cur_field) if (pCtx->cur_field)
*((int*)pCtx->cur_member) = strtol(pValue, NULL, 10); *((int*)pCtx->cur_member) = (int)strtol(pValue, NULL, 10);
} }
return JSON_Parser_Continue; return JSON_Parser_Continue;