XShapeEvent strict aliasing violation
commitbbf36355904d04300d8316e90905ab43b470f7b1
authorBrad Jorsch <anomie@users.sourceforge.net>
Thu, 8 Apr 2010 18:43:51 +0000 (8 14:43 -0400)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 12 Apr 2010 07:58:36 +0000 (12 09:58 +0200)
tree06885d72cfed50a500ba468622f6885565255d1f
parent3be81b02435610dcfe2dae1341130eca7d718c99
XShapeEvent strict aliasing violation

C99 defines new strict aliasing rules to allow compilers to make certain
optimizations. These rules prohibit converting an XEvent to an event
struct (e.g. XShapeEvent) that is not already in the XEvent union using
pointer type punning (e.g. "(XShapeEvent *)&ev"), and vice versa. The
canonical fix seems to be to create a union between XEvent and the
extension event struct to make the aliasing explicit, so do that.
src/event.c