GNOME Bugzilla – Bug 502927
g_array_index triggers cast aligment warning
Last modified: 2007-12-10 22:30:55 UTC
When compiling on various arm architectures with the gcc flag -Wcast-align enabled, g_array_index() triggers the warning "cast increases required alignment of target type" because it promotes a gchar pointer to the provided type. This warning is bogus though as the memory is correctly aligned when malloc'd. It can be worked around by an intermediate cast to a void pointer.
Created attachment 100714 [details] [review] suggested fix
Looks good to me.
committed.