Fix a gcc warning.
authorBruno Haible <bruno@clisp.org>
Mon, 10 Aug 2009 23:03:08 +0000 (01:03 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 10 Aug 2009 23:03:08 +0000 (01:03 +0200)
ChangeLog
lib/write.c

index 570bc1a02d416fb5665bfaa318a369d160d89931..f75e6c65d706d9c323601e414d38d4abbbb37220 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-10  Bruno Haible  <bruno@clisp.org>
+
+       Fix a gcc warning.
+       * lib/write.c (rpl_write): Cast result of _get_osfhandle.
+
 2009-08-10  Bruno Haible  <bruno@clisp.org>
 
        Don't optimize AC_LIBOBJs, as they may appear in different contexts.
index 250b5cc8fd4b30ee6f874d487127612a1d2fc801..5f0131d17a024d30625037a4fd318a0b57596cb7 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX compatible write() function.
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -46,7 +46,7 @@ rpl_write (int fd, const void *buf, size_t count)
   if (ret < 0)
     {
       if (GetLastError () == ERROR_NO_DATA
-         && GetFileType (_get_osfhandle (fd)) == FILE_TYPE_PIPE)
+         && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)
        {
          /* Try to raise signal SIGPIPE.  */
          raise (SIGPIPE);