[cairo] Compiler warnings of type-punned pointers in fbmmx.c
Carl Worth
cworth at cworth.org
Sat Jan 20 02:00:40 PST 2007
In fbmmx there is currently a raft of compiler warnings[*] about
type-punned pointer. Can someone who is more intimate with code than I
am please clean it up?
The most common idiom appears to be taking the address of a ullong
variable, casting that to a __mm64* and then dereferencing it, (those
types don't even mean anything to me). Almost all warnings occur when
using this idiom just before calling expand_alpha_rev so if a single
spot is needed to help clean this up, that might be useful.
But again, I really won't pretend to understand the code, so I won't
be fixing this, (just complaining).
[*]
fbmmx.c: In function '_cairo_pixman_composite_solid_mask_nx8x8888mmx':
fbmmx.c:1622: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1650: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1651: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1670: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c: In function '_cairo_pixman_composite_solid_mask_src_nx8x8888mmx':
fbmmx.c:1740: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1772: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1773: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1796: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c: In function '_cairo_pixman_composite_solid_mask_nx8x0565mmx':
fbmmx.c:1851: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1873: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1903: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1905: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1907: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1909: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c:1929: warning: dereferencing type-punned pointer will break strict-aliasing rules
fbmmx.c: In function '_cairo_pixman_solid_fill_mmx':
fbmmx.c:2660: warning: dereferencing type-punned pointer will break strict-aliasing rules
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20070120/91615df6/attachment.pgp
More information about the cairo
mailing list