[Spice-devel] [PATCH spice-gtk 0/4] Another set of macOS pre-enablement patches

Christophe de Dinechin christophe at dinechin.org
Wed May 10 16:18:37 UTC 2017


This patch set eliminates warnings detected by clang with respect
to type alignments. Vittorio Toso had submitted something
similar. In this version, I took into account comments by
Christophe Fergeau regarding how to know which casts were
aligned and which ones were not aligned. I added some
instrumentation to detect the two cases.

The casts that are supposed to be aligned will issue a warning
if data is actually misaligned.

The casts that are known to be misaligned can still be checked
by setting environment variable SPICE_DEBUG_ALIGNMENT=1

(This requires an update spice-common, reference to submodule udpated)

Christophe de Dinechin (4):
 Avoid clang warnings on casts with stricter alignment requirements
 Avoid warning about snprintf on non-Linux platforms
 Remove warning about unused variable when building on macOS
 Add check for macOS, disable ucontext on macOS (deprecated)

configure.ac                | 14 ++++++++++++++
spice-common                |  2 +-
src/channel-cursor.c        |  6 +++---
src/channel-display-mjpeg.c |  2 +-
src/decode-glz-tmpl.c       |  2 +-
src/spice-channel.c         | 14 +++++++++-----
src/spice-widget.c          |  1 +
src/usbutil.c               |  2 +-
8 files changed, 31 insertions(+), 12 deletions(-)

-- 
2.11.0 (Apple Git-81)



More information about the Spice-devel mailing list