Bug 104521 - spice-common doesn't compile with clang because of -Wcast-align
Summary: spice-common doesn't compile with clang because of -Wcast-align
Status: RESOLVED FIXED
Alias: None
Product: Spice
Classification: Unclassified
Component: canvas (show other bugs)
Version: unspecified
Hardware: Other FreeBSD
: medium normal
Assignee: Spice Bug List
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-07 09:24 UTC by Ting-Wei Lan
Modified: 2018-01-31 16:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ting-Wei Lan 2018-01-07 09:24:33 UTC
gmake[4]: Entering directory '/home/lantw44/gnome/build/spice-gtk-git/src'
  CC       client_sw_canvas.lo
In file included from /home/lantw44/gnome/source/spice-gtk-git/src/client_sw_canvas.c:20:
In file included from /home/lantw44/gnome/source/spice-gtk-git/spice-common/common/sw_canvas.c:27:
/home/lantw44/gnome/source/spice-gtk-git/spice-common/common/canvas_base.c:600:28: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'uint32_t *' (aka 'unsigned int *') increases required alignment from 1 to 4 [-Werror,-Wcast-align]
        enc_size = ntohl(*((uint32_t *)data));

It seems that this kind of error is already fixed in many places.
Comment 1 Frediano Ziglio 2018-01-30 11:51:05 UTC
Proposed patch at https://lists.freedesktop.org/archives/spice-devel/2018-January/041476.html
Comment 2 Ting-Wei Lan 2018-01-30 14:13:57 UTC
Thanks, the patch works for me.
Comment 3 Frediano Ziglio 2018-01-31 15:22:42 UTC
Merged, posted a patch to add needed spice-gtk change (import last spice-common).

https://lists.freedesktop.org/archives/spice-devel/2018-January/041626.html
Comment 4 Frediano Ziglio 2018-01-31 16:31:23 UTC
Merged.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.