summaryrefslogtreecommitdiff
path: root/libegg/eggsmclient-xsmp.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-03-15 05:10:56 +0100
committerZenWalker <[email protected]>2019-04-14 03:00:04 +0200
commit17853bced259fb720d738f59efc0af4ee5578a26 (patch)
tree2a1d0702f9c0fe2a8d95602cddc248ece6b92fc9 /libegg/eggsmclient-xsmp.c
parent3f597e10f76d7fb2a1d70bfdd86275cd737c3f96 (diff)
downloadcaja-17853bced259fb720d738f59efc0af4ee5578a26.tar.bz2
caja-17853bced259fb720d738f59efc0af4ee5578a26.tar.xz
eggsmclient-xsmp: Fix cast from non-struct type to struct type
Fixes Clang static analyzer warning: eggsmclient-xsmp.c:1156:18: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption prop->vals = (SmPropValue *)vals->data; ^~~~~~~~~~~~~~~~~~~~~~~~~ eggsmclient-xsmp.c:1189:18: warning: Casting a non-structure type to a structure type and accessing a field can lead to memory access errors or data corruption prop->vals = (SmPropValue *)vals->data; ^~~~~~~~~~~~~~~~~~~~~~~~~
Diffstat (limited to 'libegg/eggsmclient-xsmp.c')
-rw-r--r--libegg/eggsmclient-xsmp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libegg/eggsmclient-xsmp.c b/libegg/eggsmclient-xsmp.c
index 808fffc0..d93dcd1a 100644
--- a/libegg/eggsmclient-xsmp.c
+++ b/libegg/eggsmclient-xsmp.c
@@ -1153,7 +1153,7 @@ array_prop (const char *name, ...)
va_end (ap);
prop->num_vals = vals->len;
- prop->vals = (SmPropValue *)vals->data;
+ prop->vals = (SmPropValue *) (gpointer) vals->data;
g_array_free (vals, FALSE);
@@ -1186,7 +1186,7 @@ ptrarray_prop (const char *name, GPtrArray *values)
}
prop->num_vals = vals->len;
- prop->vals = (SmPropValue *)vals->data;
+ prop->vals = (SmPropValue *) (gpointer) vals->data;
g_array_free (vals, FALSE);