about summary refs log tree commit diff
path: root/iconv/iconv_prog.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconv/iconv_prog.c')
-rw-r--r--iconv/iconv_prog.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 8a8535bf50..a67c6ebad1 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -410,7 +410,8 @@ process_block (iconv_t cd, char *addr, size_t len, FILE *output)
 	  /* We have something to write out.  */
 	  int errno_save = errno;
 
-	  if (fwrite (outbuf, 1, outptr - outbuf, output) < outptr - outbuf
+	  if (fwrite (outbuf, 1, outptr - outbuf, output)
+	      < (size_t) (outptr - outbuf)
 	      || ferror (output))
 	    {
 	      /* Error occurred while printing the result.  */
@@ -435,7 +436,8 @@ conversion stopped due to problem in writing the output"));
 	      /* We have something to write out.  */
 	      int errno_save = errno;
 
-	      if (fwrite (outbuf, 1, outptr - outbuf, output) < outptr - outbuf
+	      if (fwrite (outbuf, 1, outptr - outbuf, output)
+		  < (size_t) (outptr - outbuf)
 		  || ferror (output))
 		{
 		  /* Error occurred while printing the result.  */