Skip to content

Commit

Permalink
Fix mismatched signs in comparison after b44defe (#209)
Browse files Browse the repository at this point in the history
```
../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)) {
                          ~~~~~^~~~~~~~~~~~~~~~~~
```
  • Loading branch information
janisozaur authored and msciotti committed Jul 30, 2018
1 parent b44defe commit 3d3ae71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/discord_register_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 3d3ae71

Please sign in to comment.