summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-07 22:34:01 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-07 22:34:01 +0100
commit285bf84b4b9aca828828a8729b04cd59ab333dac (patch)
tree287c997dd02a830ec8b3c29e005d789cabbfced0
parent6602af7fe069246dbcf419c3e904a78b60e7d4dc (diff)
patch 7.4.1061v7.4.1061
Problem: Compiler warning for ignoring return value of fwrite(). Solution: Do use the return value. (idea: Charles Campbell)
-rw-r--r--src/misc2.c5
-rw-r--r--src/proto/misc2.pro2
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 65ac886cfe..0aad428219 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -6300,8 +6300,9 @@ put_bytes(fd, nr, len)
/*
* Write time_t to file "fd" in 8 bytes.
+ * Returns FAIL when the write failed.
*/
- void
+ int
put_time(fd, the_time)
FILE *fd;
time_t the_time;
@@ -6309,7 +6310,7 @@ put_time(fd, the_time)
char_u buf[8];
time_to_bytes(the_time, buf);
- (void)fwrite(buf, (size_t)8, (size_t)1, fd);
+ return fwrite(buf, (size_t)8, (size_t)1, fd) == 1 ? OK : FAIL;
}
/*
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index 4a955e32fa..35e1a8ec86 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -105,7 +105,7 @@ int get4c __ARGS((FILE *fd));
time_t get8ctime __ARGS((FILE *fd));
char_u *read_string __ARGS((FILE *fd, int cnt));
int put_bytes __ARGS((FILE *fd, long_u nr, int len));
-void put_time __ARGS((FILE *fd, time_t the_time));
+int put_time __ARGS((FILE *fd, time_t the_time));
void time_to_bytes __ARGS((time_t the_time, char_u *buf));
int has_non_ascii __ARGS((char_u *s));
void parse_queued_messages __ARGS((void));
diff --git a/src/version.c b/src/version.c
index 23bd3f72eb..1b42524a28 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1061,
+/**/
1060,
/**/
1059,