Skip to content

Commit fbc4b4d

Browse files
committed
patch 7.4.1276
Problem: Warning for not using return value of fcntl(). Solution: Explicitly ignore the return value.
1 parent cb4b012 commit fbc4b4d

5 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/channel.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ channel_open(char *hostname, int port_in, int waittime, void (*close_cb)(void))
465465
val = 0;
466466
ioctlsocket(sd, FIONBIO, &val);
467467
#else
468-
fcntl(sd, F_SETFL, 0);
468+
(void)fcntl(sd, F_SETFL, 0);
469469
#endif
470470
}
471471

@@ -1474,6 +1474,9 @@ channel_parse_messages(void)
14741474
return ret;
14751475
}
14761476

1477+
/*
1478+
* Mark references to lists used in channels.
1479+
*/
14771480
int
14781481
set_ref_in_channel(int copyID)
14791482
{

src/fileio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2350,7 +2350,7 @@ readfile(
23502350
{
23512351
int fdflags = fcntl(fd, F_GETFD);
23522352
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
2353-
fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
2353+
(void)fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
23542354
}
23552355
#endif
23562356
vim_free(buffer);

src/memfile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ mf_do_open(
13121312
#ifdef HAVE_FD_CLOEXEC
13131313
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
13141314
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
1315-
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
1315+
(void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
13161316
#endif
13171317
#if defined(HAVE_SELINUX) || defined(HAVE_SMACK)
13181318
mch_copy_sec(fname, mfp->mf_fname);

src/memline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ ml_setname(buf_T *buf)
728728
{
729729
int fdflags = fcntl(mfp->mf_fd, F_GETFD);
730730
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
731-
fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
731+
(void)fcntl(mfp->mf_fd, F_SETFD, fdflags | FD_CLOEXEC);
732732
}
733733
#endif
734734
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1276,
750752
/**/
751753
1275,
752754
/**/

0 commit comments

Comments
 (0)