Eric Blake wrote: > @@ -44,7 +44,7 @@ dup_noinherit (int fd) > (DWORD) 0, /* DesiredAccess */ > FALSE, /* InheritHandle */ > DUPLICATE_SAME_ACCESS)) /* Options */ > - error (EXIT_FAILURE, 0, _("DuplicateHandle failed with error code > 0x%08x"), > + error (EXIT_FAILURE, 0, _("DuplicateHandle failed with error code > 0x%08lx"), > GetLastError ());
DWORD is uint32_t. Whether 'long' is also uint32_t on all Windows ABIs, is not clear to me. When I see patches like [1], I get confused. So better avoid the warning using riskless code: [1] http://www.winehq.org/pipermail/wine-patches/2006-November/032672.html 2009-03-06 Bruno Haible <br...@clisp.org> * lib/w32spawn.h (dup_noinherit): Add cast, to avoid gcc warning. Reported by Eric Blake. --- lib/w32spawn.h.orig 2009-03-06 15:52:09.000000000 +0100 +++ lib/w32spawn.h 2009-03-06 15:50:26.000000000 +0100 @@ -1,5 +1,5 @@ /* Auxiliary functions for the creation of subprocesses. Native Woe32 API. - Copyright (C) 2003, 2006-2008 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc. Written by Bruno Haible <br...@clisp.org>, 2003. This program is free software: you can redistribute it and/or modify @@ -45,7 +45,7 @@ FALSE, /* InheritHandle */ DUPLICATE_SAME_ACCESS)) /* Options */ error (EXIT_FAILURE, 0, _("DuplicateHandle failed with error code 0x%08x"), - GetLastError ()); + (unsigned int) GetLastError ()); nfd = _open_osfhandle ((long) new_handle, O_BINARY); if (nfd < 0)