Warnings as errors yelling

This commit is contained in:
msciotti 2018-11-07 17:19:03 -08:00
parent 544f91a5a8
commit d90a8efd47
No known key found for this signature in database
GPG Key ID: 40FADA25CF0EAD84

View File

@ -62,8 +62,9 @@ bool BaseConnection::Open(int pipe)
int optval = 1; int optval = 1;
setsockopt(self->sock, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)); setsockopt(self->sock, SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval));
#endif #endif
for (pipe; pipe < 10; ++pipe) { for (int pipeNum = pipe; pipeNum < 10; ++pipeNum) {
snprintf(PipeAddr.sun_path, sizeof(PipeAddr.sun_path), "%s/discord-ipc-%d", tempPath, pipe); snprintf(
PipeAddr.sun_path, sizeof(PipeAddr.sun_path), "%s/discord-ipc-%d", tempPath, pipeNum);
int err = connect(self->sock, (const sockaddr*)&PipeAddr, sizeof(PipeAddr)); int err = connect(self->sock, (const sockaddr*)&PipeAddr, sizeof(PipeAddr));
if (err == 0) { if (err == 0) {
self->isOpen = true; self->isOpen = true;