mirror of
https://github.com/yuzu-emu/discord-rpc
synced 2024-11-26 03:17:45 +00:00
``` ../src/discord_register_linux.cpp: In function ‘void Discord_Register(const char*, const char*)’: ../src/discord_register_linux.cpp:37:31: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare] if (size <= 0 || size >= sizeof(exePath)) { ~~~~~^~~~~~~~~~~~~~~~~~ ```
This commit is contained in:
parent
b44defe60a
commit
3d3ae7129d
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ extern "C" DISCORD_EXPORT void Discord_Register(const char* applicationId, const
|
|||
char exePath[1024];
|
||||
if (!command || !command[0]) {
|
||||
ssize_t size = readlink("/proc/self/exe", exePath, sizeof(exePath));
|
||||
if (size <= 0 || size >= sizeof(exePath)) {
|
||||
if (size <= 0 || size >= (ssize_t)sizeof(exePath)) {
|
||||
return;
|
||||
}
|
||||
exePath[size] = '\0';
|
||||
|
|
Loading…
Reference in a new issue