[Spice-commits] 2 commits - gtk/usb-device-manager.c gtk/win-usb-driver-install.c
Uri Lublin
uril at kemper.freedesktop.org
Tue Jul 10 09:55:05 PDT 2012
gtk/usb-device-manager.c | 2 ++
gtk/win-usb-driver-install.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 12b348a1633fdad6ae305b02245fb40dceb78e95
Author: Uri Lublin <uril at redhat.com>
Date: Tue Jul 10 19:03:05 2012 +0300
usb-device-manager: mingw: win driver install callback: add missing ifdef
This fixes the following compilation error message (without USE_USBREDIR):
usb-device-manager.c:183:13: error: 'spice_usb_device_manager_drv_install_cb' declared 'static' but never defined [-Werror=unused-function]
diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index 58dde67..9dab4c6 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -179,11 +179,13 @@ G_DEFINE_BOXED_TYPE(SpiceUsbDevice, spice_usb_device, g_object_ref, g_object_unr
static void spice_usb_device_manager_initable_iface_init(GInitableIface *iface);
+#ifdef USE_USBREDIR
#ifdef G_OS_WIN32
static void spice_usb_device_manager_drv_install_cb(GObject *gobject,
GAsyncResult *res,
gpointer user_data);
#endif
+#endif
static guint signals[LAST_SIGNAL] = { 0, };
commit 59f31ce5027ac5e67e88e2117663535a1d4811a5
Author: Uri Lublin <uril at redhat.com>
Date: Tue Jul 10 18:36:57 2012 +0300
win-usb-driver-install: initialize "req" with memset
This fixes the following compilation error message:
../../gtk/win-usb-driver-install.c: In function 'spice_win_usb_driver_send_request':
../../gtk/win-usb-driver-install.c:187:5: error: missing braces around initializer [-Werror=missing-braces]
../../gtk/win-usb-driver-install.c:187:5: error: (near initialization for 'req.hdr') [-Werror=missing-braces]
diff --git a/gtk/win-usb-driver-install.c b/gtk/win-usb-driver-install.c
index 8b326b5..02d20d6 100644
--- a/gtk/win-usb-driver-install.c
+++ b/gtk/win-usb-driver-install.c
@@ -184,7 +184,7 @@ static
gboolean spice_win_usb_driver_send_request(SpiceWinUsbDriver *self, guint16 op,
guint16 vid, guint16 pid, GError **err)
{
- USBClerkDriverOp req = {0,};
+ USBClerkDriverOp req;
GOutputStream *ostream;
SpiceWinUsbDriverPrivate *priv;
gsize bytes;
@@ -196,6 +196,7 @@ gboolean spice_win_usb_driver_send_request(SpiceWinUsbDriver *self, guint16 op,
g_return_val_if_fail(SPICE_IS_WIN_USB_DRIVER(self), FALSE);
priv = self->priv;
+ memset(&req, 0, sizeof(req));
req.hdr.magic = USB_CLERK_MAGIC;
req.hdr.version = USB_CLERK_VERSION;
req.hdr.type = op;
More information about the Spice-commits
mailing list