Fixed Xcode warnings

This commit is contained in:
Sam Lantinga
2024-09-18 13:20:53 -07:00
parent 7edf7fad66
commit 481203c074
5 changed files with 44 additions and 22 deletions

View File

@@ -143,7 +143,7 @@ static bool AddFileDescriptorCloseActions(posix_spawn_file_actions_t *fa)
}
closedir(dir);
} else {
for (int fd = sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; --fd) {
for (int fd = (int)(sysconf(_SC_OPEN_MAX) - 1); fd > STDERR_FILENO; --fd) {
int flags = fcntl(fd, F_GETFD);
if (flags < 0 || (flags & FD_CLOEXEC)) {
continue;