[PATCH spice-gtk v8 0/4] Repair macOS builds for spice-gtk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Christophe de Dinechin <dinechin@xxxxxxxxxx>

This patch set contains various fixes that repair macOS builds for
spice-gtk (and presumably clang builds as a side effect), notably:

- Fixes for clang-specific warnings, notably on alignment
- Addition of macOS detection in configure script
- A couple minor portablity fixes

This requires an update to spice-common, see
https://lists.freedesktop.org/archives/spice-devel/2017-May/037505.html.
The reference to submodule  in this patch serie is updated with a
reference that can be fetched from https://github.com/c3d/spice-common.git.

Version 2 takes into account comments by Frediano Ziglio and Pavel Grunt,
specifically:

- Clarify purpose and behavior of macros in patch commit message
- Change one case to 'unaligned'
- Improve way to avoid 'unused variable' warning

Acked by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Version 3 takes into account comments made by Christophe Fergeau in
his ack message, specifically:

- Improve the log message description of SPICE_(UN)ALIGNED_CAST.
  Hopefully the new one is better.

- Make spaces after commas consistent

In addition, v3 re-enables ucontext on macOS, following comments
that this is the right thing to do for performance. This required the
elimination of one more alignment warning.

Version 4 takes into account comments made by Pavel and Frediano,
specifically:

- Reorder the previous iteration to group things more logically
- Add a TODO comment for macOS in set_mouse_accel

Version 5 adds the --enable-alignment-checks configuration option
and disables all runtime checks by default.

Version 6 groups the --enable-alignment-checks configuration option
with the warning detection, and addresses some of the alignment issues
as discussed with Frediano.

Version 7 modifies some comments (nits reported by Christophe Fergeau),
fixes a bogus array size change I had made earlier (seen by Frediano Ziglio),
and takes into account one additional cast introduced in master lately.

Version 8 separates a whitespace change in its own patch, groups
alignment detection and alignment fixes in a single patch, and
changes the type of palette to guint32, all suggested by Frediano.

For reviewers convenience, the diff between v8 and v7 is:

diff --git a/src/channel-cursor.c b/src/channel-cursor.c
index 4faaa95..14053a9 100644
--- a/src/channel-cursor.c
+++ b/src/channel-cursor.c
@@ -381,11 +381,11 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor)
     SpiceCursorHeader *hdr = &scursor->header;
     display_cursor *cursor;
     size_t size;
-    gint i, pix_mask, pix;
+    guint32 i, pix_mask, pix;
     const guint8* data;
     guint8 *rgba;
     guint8 val;
-    gint palette[16];
+    guint32 palette[16];

     CHANNEL_DEBUG(channel, "%s: flags %x, size %u", __FUNCTION__,
                   scursor->flags, scursor->data_size);

Christophe de Dinechin (4):
  Remove trailing space
  Add check for macOS and macOS specific define to allow ucontext
  Avoid clang warnings on casts with stricter alignment requirements
  Remove warning about unused variable when building on macOS

 configure.ac                | 23 +++++++++++++++++++++++
 spice-common                |  2 +-
 src/channel-cursor.c        |  8 +++++---
 src/channel-display-mjpeg.c |  2 +-
 src/channel-main.c          |  2 +-
 src/continuation.h          |  6 ++++--
 src/decode-glz-tmpl.c       |  2 +-
 src/spice-channel.c         | 26 ++++++++++++++++----------
 src/spice-widget.c          |  7 ++++---
 9 files changed, 56 insertions(+), 22 deletions(-)

-- 
2.11.0 (Apple Git-81)

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]