[Libvir] [PATCH] libvirt.c: warning: dereferencing type-punned pointer will break strict-aliasing rules
Richard W.M. Jones
rjones at redhat.com
Wed Mar 7 09:52:41 UTC 2007
Daniel P. Berrange wrote:
> Looking at the code, IMHO, the whole approach of iterating over the driver
> table soo many times is just wrong, when we can simply have an integer
> count recording how many drivers are registered. This eliminates both
> for(;;) loops, and reduces the amount of code to the point where I don't
> think there's anything to be gained by having a generic _virDriverRegister
> with all the type-casting this entails.
A kind of "Shlemiel the painter" problem?
> So how about the attached patch instead....
I think that looks better.
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...
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
More information about the libvir-list