[PATCH] Fix misc aliasing warnings.

Dave Korn dave.korn.cygwin@googlemail.com
Sat Jan 9 11:14:00 GMT 2010

    Hi gang,

  Here's a bunch of fixes for more sensitive aliasing warnings present in


	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Add new
	overload that accepts LARGE_INTEGER rather than FILETIME arguments.
	(fhandler_base::fstat_by_handle): Don't alias arguments in call
	to fstat_helper, allowing new overload to resolve invocation.
	(fhandler_base::fstat_by_name): Likewise.
	* fhandler.h (fhandler_base::fstat_helper): Prototype new overload.
	* fhandler_floppy.cc (fhandler_dev_floppy::get_drive_info): Avoid
	* fhandler_proc.cc (format_proc_cpuinfo): Likewise.
	* passwd.cc (internal_getpwsid): Avoid sequence point warning.
	* syscalls.cc (gethostid): Avoid aliasing.
	* include/cygwin/in6.h (IN6_ARE_ADDR_EQUAL): Likewise.

  With this it all builds and the resulting DLL hasn't shown up any surprises,
although I haven't exercised the floppy code any.  (Don't even have one these
days.)  Still, it's probably safe enough to go on head which is unstable after
all.  OK?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: misc-gcc450-aliasing-fixes.diff
Type: text/x-c
Size: 9063 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20100109/9a476555/attachment.bin>

More information about the Cygwin-patches mailing list