[Libvir] [PATCH] libvirt.c: warning: dereferencing type-punned pointer will break strict-aliasing rules
Richard W.M. Jones
rjones at redhat.com
Fri Mar 2 11:30:12 UTC 2007
I'm currently trying to get libvirt to compile with -Werror. One
problem which came up early is the warning in $SUBJECT. The gcc info
page (see -fstrict-aliasing) is pretty unclear about what exactly causes
this problem, so the attached patch rewrites the code quite
conservatively to avoid the problem.
Rich.
--
Emerging Technologies, Red Hat http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421
"[Negative numbers] darken the very whole doctrines of the equations
and make dark of the things which are in their nature excessively
obvious and simple" (Francis Maseres FRS, mathematician, 1759)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-punning.patch
Type: text/x-patch
Size: 1552 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070302/3e3e1fe2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070302/3e3e1fe2/attachment-0003.bin>
More information about the libvir-list
mailing list