diff options
author | Gaƫl Bonithon <gael@xfce.org> | 2021-03-11 21:52:51 +0100 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2021-11-10 20:59:53 +0000 |
commit | 0c85f067645999705bb410ceab9516432efa75ef (patch) | |
tree | 655ce3bd88c5c03bf0b0232547c597fe4ace4817 | |
parent | 8ee9b43d1c2dc4afcfd5bd6ef14d60a1ba984e16 (diff) | |
download | xfconf-0c85f067645999705bb410ceab9516432efa75ef.tar.gz |
Silent `-Wcast-align` from Clang
Fixes #25.
-rw-r--r-- | xfconf/xfconf-channel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xfconf/xfconf-channel.c b/xfconf/xfconf-channel.c index e56d6ca..86bb300 100644 --- a/xfconf/xfconf-channel.c +++ b/xfconf/xfconf-channel.c @@ -1908,7 +1908,7 @@ xfconf_channel_get_structv(XfconfChannel *channel, val = g_ptr_array_index(arr, i); \ CHECK_VALUE_TYPES(val, GTYPE); \ cur_offset = ALIGN_VAL(cur_offset, alignment); \ - __val_p = (ctype *)(((guchar *)(&(((DummyStruct *)value_struct)->a)))+cur_offset); \ + __val_p = (ctype *)(gpointer)(((guchar *)(&(((DummyStruct *)value_struct)->a)))+cur_offset); \ *__val_p = cvalgetter(val); \ cur_offset += sizeof(ctype); \ }G_STMT_END @@ -2126,7 +2126,7 @@ xfconf_channel_set_structv(XfconfChannel *channel, val = g_new0(GValue, 1); \ g_value_init(val, GTYPE); \ cur_offset = ALIGN_VAL(cur_offset, alignment); \ - __val_p = (ctype *)(((guchar *)(&(((DummyStruct *)value_struct)->a)))+cur_offset); \ + __val_p = (ctype *)(gpointer)(((guchar *)(&(((DummyStruct *)value_struct)->a)))+cur_offset); \ cvalsetter(val, *__val_p); \ g_ptr_array_add(arr, val); \ cur_offset += sizeof(ctype); \ |