From e954a69708101979e0ce474d63b4697987842dbd Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Sun, 19 Jun 2022 19:20:19 +0200 Subject: [PATCH] Truncation is intentional - see if using the return value and storing it in a local var can work around the warning --- network/netplay/netplay_frontend.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network/netplay/netplay_frontend.c b/network/netplay/netplay_frontend.c index 5f3e2aa3f5..508932f6dc 100644 --- a/network/netplay/netplay_frontend.c +++ b/network/netplay/netplay_frontend.c @@ -4859,10 +4859,10 @@ 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 + 64]; - - /* Truncate the message if necessary. */ - snprintf(formatted_chat, sizeof(formatted_chat), "%s: %s", nick, 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; RARCH_LOG("[Netplay] %s\n", formatted_chat);