vim-patch:7.4.1276

Problem:    Warning for not using return value of fcntl().
Solution:   Explicitly ignore the return value.

fbc4b4db3a
This commit is contained in:
Michael Ennen
2016-05-10 23:30:26 -07:00
parent 6396beb432
commit cf29b4025d
4 changed files with 8 additions and 6 deletions

View File

@@ -1749,8 +1749,9 @@ failed:
#ifdef HAVE_FD_CLOEXEC
else {
int fdflags = fcntl(fd, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
(void)fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
}
}
#endif
xfree(buffer);