From 4b796ae740bd5238789f57ba3292888379c9b9ad Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Mon, 6 Mar 2017 12:11:47 +0100 Subject: [PATCH] Silence warnings --- libretro-common/string/stdstring.c | 2 +- menu/cbs/menu_cbs_ok.c | 2 +- network/netplay/netplay_frontend.c | 4 ++-- network/netplay/netplay_room_parse.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libretro-common/string/stdstring.c b/libretro-common/string/stdstring.c index 5071a6de90..0935a1018b 100644 --- a/libretro-common/string/stdstring.c +++ b/libretro-common/string/stdstring.c @@ -168,7 +168,7 @@ char *string_trim_whitespace(char *const s) char *word_wrap(char* buffer, const char *string, int line_width) { unsigned i = 0; - unsigned len = strlen(string); + unsigned len = (unsigned)strlen(string); while (i < len) { diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index f11e625301..76e1581009 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3448,7 +3448,7 @@ finish: netplay_discovery_driver_ctl(RARCH_NETPLAY_DISCOVERY_CTL_LAN_GET_RESPONSES, &lan_hosts); #endif if (lan_hosts) - lan_room_count = lan_hosts->size; + lan_room_count = (int)lan_hosts->size; netplay_rooms_parse(buf); diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 6b0809de9a..7ec1684185 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -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); - ip_len = strlen(mitm_ip); - port_len = strlen(mitm_port); + ip_len = (unsigned)strlen(mitm_ip); + port_len = (unsigned)strlen(mitm_port); /* Enable Netplay client mode */ if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL)) diff --git a/network/netplay/netplay_room_parse.c b/network/netplay/netplay_room_parse.c index 69e862f04d..b06aa44361 100644 --- a/network/netplay/netplay_room_parse.c +++ b/network/netplay/netplay_room_parse.c @@ -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")) { /* 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) 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 (pCtx->cur_field) - *((int*)pCtx->cur_member) = strtol(pValue, NULL, 10); + *((int*)pCtx->cur_member) = (int)strtol(pValue, NULL, 10); } return JSON_Parser_Continue;