Bug 20137 - Fix alignment usage when demarshaling basics
authorColin Walters <walters@verbum.org>
Wed, 25 Feb 2009 16:10:15 +0000 (11:10 -0500)
committerColin Walters <walters@verbum.org>
Wed, 6 May 2009 16:51:17 +0000 (12:51 -0400)
commit15f518301605ed748fbcecdf5e38d0a5ef982c3b
tree696948b35333656cd9da0bcc4103c13639cbcef4
parenta709566edd8358ba431b7427a1530a7db0d1832d
Bug 20137 - Fix alignment usage when demarshaling basics

We can't safely type-pun from e.g. char * to DBusBasicValue *, because
the latter has higher alignment requirements.  Instead, create an
explicit pointer for each case.

Also, we mark each one volatile to sidestep strict aliasing issues, for
the future when we turn on strict aliasing support.

Original patch and review from Jay Estabrook <jay.estabrook@hp.com>.
dbus/dbus-marshal-basic.c