After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760350 - Cast the return value of g_array_free to void* before casting to char** in gtk_action_muxer_list_actions
Cast the return value of g_array_free to void* before casting to char** in gt...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.19.x
Other FreeBSD
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 755659
 
 
Reported: 2016-01-09 09:33 UTC by Ting-Wei Lan
Modified: 2016-01-10 16:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Cast the return value of g_array_free to void* before casting to char** (925 bytes, patch)
2016-01-09 09:35 UTC, Ting-Wei Lan
committed Details | Review

Description Ting-Wei Lan 2016-01-09 09:33:40 UTC
Casting from char* to char** causes clang to show this warning:
cast from 'gchar *' (aka 'char *') to 'gchar **' (aka 'char **') increases required alignment from 1 to 8

Please see the attached patch. We can avoid this warning by casting it to void*.
Comment 1 Ting-Wei Lan 2016-01-09 09:35:09 UTC
Created attachment 318568 [details] [review]
Cast the return value of g_array_free to void* before casting to char**

Let the compiler know that we don't want to use it as char*, so there is
no alignment error.

https://bugzilla.gnome.org/show_bug.cgi?id=760350
https://bugzilla.gnome.org/show_bug.cgi?id=755659

This problem was found when compiling gnome-shell.
Comment 2 Matthias Clasen 2016-01-10 16:03:15 UTC
Review of attachment 318568 [details] [review]:

Sure
Comment 3 Ting-Wei Lan 2016-01-10 16:25:54 UTC
Attachment 318568 [details] pushed as 0f120ea - Cast the return value of g_array_free to void* before casting to char**