From b425d04291dafe48675be90eb8e6f2ab9a66d87c Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Mon, 17 Jun 2024 16:56:07 +0100 Subject: [PATCH] VITA: Fix -Wpointer-sign warning source/net_udp.c: In function 'UDP_Init': source/net_udp.c:102:25: warning: pointer targets in passing argument 2 of 'Cvar_Set' differ in signedness [-Wpointer-sign] 102 | Cvar_Set ("hostname", nick); | ^~~~ | | | SceChar8 * {aka signed char *} In file included from source/quakedef.h:282, from source/net_udp.c:26: source/cvar.h:98:50: note: expected 'const char *' but argument is of type 'SceChar8 *' {aka 'signed char *'} 98 | void Cvar_Set (const char *var_name, const char *value); | ~~~~~~~~~~~~^~~~~ --- source/net_udp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net_udp.c b/source/net_udp.c index 5b8bf2e..e7d6489 100644 --- a/source/net_udp.c +++ b/source/net_udp.c @@ -99,7 +99,7 @@ sys_socket_t UDP_Init (void) sceAppUtilInit(&init_param, &boot_param); SceChar8 nick[SCE_SYSTEM_PARAM_USERNAME_MAXSIZE]; sceAppUtilSystemParamGetString(SCE_SYSTEM_PARAM_ID_USERNAME, nick, SCE_SYSTEM_PARAM_USERNAME_MAXSIZE); - Cvar_Set ("hostname", nick); + Cvar_Set ("hostname", (const char*)nick); } #else if (gethostname(buff, MAXHOSTNAMELEN) != 0)