Fix compiler warnings

When dereferencing GArray.data to a C structure you need a double cast
from guint8* to void*, and then from void* to the actual type. This
avoids compiler warnings, especially when using clang on OSX.
This commit is contained in:
Emmanuele Bassi
2012-01-16 23:49:49 +00:00
parent eb489a40de
commit 1dfc503df1
4 changed files with 26 additions and 24 deletions

View File

@ -2000,6 +2000,7 @@ _clutter_script_construct_object (ClutterScript *script,
else
{
GList *properties = oinfo->properties;
GParameter *parameters = (GParameter *) (void *) params->data;
/* every other object: first, we get the construction parameters */
oinfo->properties =
@ -2011,7 +2012,7 @@ _clutter_script_construct_object (ClutterScript *script,
oinfo->object = g_object_newv (oinfo->gtype,
params->len,
(GParameter *) params->data);
parameters);
/* by sinking the floating reference, we make sure that the reference
* count is correct whether the object is referenced from somewhere