bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

write: fix a gcc warning


From: Bruno Haible
Subject: write: fix a gcc warning
Date: Tue, 11 Aug 2009 01:04:14 +0200
User-agent: KMail/1.9.9

Seen on mingw:
write.c:49: warning: passing arg 1 of `GetFileType' makes pointer from integer 
without a cast

This fixes it.


2009-08-10  Bruno Haible  <address@hidden>

        Fix a gcc warning.
        * lib/write.c (rpl_write): Cast result of _get_osfhandle.

--- lib/write.c.orig    2009-08-11 01:01:56.000000000 +0200
+++ lib/write.c 2009-08-11 01:01:39.000000000 +0200
@@ -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 <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -46,7 +46,7 @@
   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);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]