From 5007e89161d191654521c64535e1f304bdc1abec Mon Sep 17 00:00:00 2001 From: David Levine Date: Sat, 19 Mar 2016 10:15:43 -0400 Subject: [PATCH] Added check of return value of write() to quash compiler warning. --- uip/mhshowsbr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index 02b36412..a87778ef 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -1152,7 +1152,9 @@ iconv_start: } if (errno == EINVAL) { /* middle of multi-byte sequence */ - write (fd, dest_buffer, outbytes_before - outbytes); + if (write (fd, dest_buffer, outbytes_before - outbytes) < 0) { + advise (dest, "write"); + } fseeko (*fp, -inbytes, SEEK_CUR); if (end > 0) bytes_to_read += inbytes; /* advise(NULL, "convert_charset: EINVAL"); */ -- 2.56.0