mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
(Wii) Silence some warnings (#14092)
This commit is contained in:
parent
3615deed9e
commit
2a0fce77d3
@ -620,6 +620,20 @@ const char *inet_ntop_compat(int af, const void *src, char *dst, socklen_t cnt)
|
||||
return sceNetInetNtop(af,src,dst,cnt);
|
||||
#elif defined(WIIU)
|
||||
return inet_ntop(af, src, dst, cnt);
|
||||
#elif defined(GEKKO)
|
||||
if (af == AF_INET)
|
||||
{
|
||||
const char *addr_str = inet_ntoa(*(struct in_addr*)src);
|
||||
|
||||
if (addr_str)
|
||||
{
|
||||
strlcpy(dst, addr_str, cnt);
|
||||
|
||||
return dst;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
#elif defined(_XBOX)
|
||||
return isockaddr_ntop(af, src, dst, cnt);
|
||||
#elif defined(_WIN32)
|
||||
|
@ -97,7 +97,6 @@ static void convert_ip(char *dst, size_t size, uint32_t ip, bool inverted)
|
||||
|
||||
bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
{
|
||||
unsigned k = 0;
|
||||
#if defined(GEKKO)
|
||||
char hostname[128];
|
||||
|
||||
@ -130,6 +129,7 @@ bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
Result rc;
|
||||
#endif
|
||||
char hostname[128];
|
||||
unsigned k = 0;
|
||||
struct net_ifinfo_entry *ptr = NULL;
|
||||
|
||||
memset(list, 0, sizeof(net_ifinfo_t));
|
||||
@ -184,6 +184,7 @@ bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
|
||||
return true;
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
unsigned k = 0;
|
||||
PIP_ADAPTER_ADDRESSES adapter_addresses = NULL, aa = NULL;
|
||||
PIP_ADAPTER_UNICAST_ADDRESS ua = NULL;
|
||||
#ifdef _WIN32_WINNT_WINXP
|
||||
@ -231,6 +232,7 @@ bool net_ifinfo_new(net_ifinfo_t *list)
|
||||
|
||||
free(adapter_addresses);
|
||||
#else
|
||||
unsigned k = 0;
|
||||
struct ifaddrs *ifa = NULL;
|
||||
struct ifaddrs *ifaddr = NULL;
|
||||
|
||||
|
@ -4860,9 +4860,17 @@ static void relay_chat(netplay_t *netplay, const char *nick, const char *msg)
|
||||
static void show_chat(netplay_t *netplay, const char *nick, const char *msg)
|
||||
{
|
||||
char formatted_chat[NETPLAY_CHAT_MAX_SIZE];
|
||||
/* Truncate the message if necessary. Truncation here is intentional. */
|
||||
int ret = snprintf(formatted_chat, sizeof(formatted_chat), "%s: %s", nick, msg);
|
||||
(void)ret;
|
||||
|
||||
/* Truncate the message if necessary.
|
||||
Truncation here is intentional. */
|
||||
#ifdef GEKKO
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wformat-truncation"
|
||||
#endif
|
||||
snprintf(formatted_chat, sizeof(formatted_chat), "%s: %s", nick, msg);
|
||||
#ifdef GEKKO
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
RARCH_LOG("[Netplay] %s\n", formatted_chat);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user