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);
      |                                      ~~~~~~~~~~~~^~~~~
This commit is contained in:
Peter0x44 2024-06-17 16:56:07 +01:00
parent b709396d40
commit b425d04291
1 changed files with 1 additions and 1 deletions

View File

@ -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)