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>
Tue, 17 Mar 2009 20:42:43 +0000 (16:42 -0400)
commit7de15965c263dccf22b08ffb5939f37f7043795d
tree4e83dd335f8309c44343e9fa0b474b6048639166
parent3f3a53190237034f01d4d798e5dea0b001b16d17
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