Merge remote-tracking branch 'cgutman/fix-warnings'

This commit is contained in:
Iwan Timmer 2019-05-01 19:55:50 +02:00
commit 005407083b
2 changed files with 4 additions and 3 deletions

View File

@ -76,14 +76,15 @@ void loop_remove_fd(int fd) {
int fdindex;
for (int i=0;i<numFds;i++) {
if (fds[i].fd = fd)
if (fds[i].fd == fd) {
fdindex = i;
break;
}
}
if (fdindex != numFds && numFds > 0) {
memcpy(&fds[fdindex], &fds[numFds], sizeof(struct pollfd));
memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler*));
memcpy(&fdHandlers[fdindex], &fdHandlers[numFds], sizeof(FdHandler));
}
}

View File

@ -95,7 +95,7 @@ static void stream(PSERVER_DATA server, PCONFIGURATION config, enum platform sys
#ifdef HAVE_SDL
gamepads += sdl_gamepads;
#endif
int gamepad_mask;
int gamepad_mask = 0;
for (int i = 0; i < gamepads && i < 4; i++)
gamepad_mask = (gamepad_mask << 1) + 1;