From be759fc1de044b50f6ccab6feb3f2c9dbb39cbb9 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 11 Aug 2009 01:03:08 +0200 Subject: [PATCH] Fix a gcc warning. --- ChangeLog | 5 +++++ lib/write.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 570bc1a02..f75e6c65d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-08-10 Bruno Haible + Fix a gcc warning. + * lib/write.c (rpl_write): Cast result of _get_osfhandle. + +2009-08-10 Bruno Haible + Don't optimize AC_LIBOBJs, as they may appear in different contexts. * m4/close.m4 (gl_REPLACE_CLOSE): Execute AC_LIBOBJ unconditionally, not only the first time. diff --git a/lib/write.c b/lib/write.c index 250b5cc8f..5f0131d17 100644 --- a/lib/write.c +++ b/lib/write.c @@ -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 , 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); -- 2.11.0