[Spice-devel] [PATCH spice-gtk 3/4] Remove warning about unused variable when building on macOS

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


On macOS, neither of the two cases implemented in set_mouse_accel applies.
We get the following eror message:

 CC       spice-widget.lo
spice-widget.c:944:26: error: unused variable 'd' [-Werror,-Wunused-variable]
   SpiceDisplayPrivate *d = display->priv;

Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
---
src/spice-widget.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 8203d55..d01a230 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -977,6 +977,7 @@ static void set_mouse_accel(SpiceDisplay *display, gboolean enabled)
    }
#else
    g_warning("Mouse acceleration code missing for your platform");
+    (void) d;    
#endif
}

-- 
2.11.0 (Apple Git-81)



More information about the Spice-devel mailing list