mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
6396beb432
commit
cf29b4025d
@ -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);
|
||||
|
@ -913,7 +913,7 @@ static bool mf_do_open(memfile_T *mfp, char_u *fname, int flags)
|
||||
#ifdef HAVE_FD_CLOEXEC
|
||||
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
|
||||
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
(void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_SELINUX
|
||||
|
@ -443,8 +443,9 @@ void ml_setname(buf_T *buf)
|
||||
#ifdef HAVE_FD_CLOEXEC
|
||||
{
|
||||
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
|
||||
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
|
||||
(void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ static int included_patches[] = {
|
||||
// 1279 NA
|
||||
// 1278 NA
|
||||
// 1277 NA
|
||||
// 1276,
|
||||
1276,
|
||||
// 1275 NA
|
||||
// 1274 NA
|
||||
// 1273,
|
||||
|
Loading…
Reference in New Issue
Block a user