[Spice-devel] [spice-gtk Win32 v2 PATCH 1/5] Move "err" variable definition to beginning of the function
Uri Lublin
uril at redhat.com
Sun May 20 09:34:08 PDT 2012
This fixes the following compilation error:
channel-usbredir.c: In function 'spice_usbredir_channel_connect_device_async':
channel-usbredir.c:313:9: error: jump skips variable initialization [-Werror=jump-misses-init]
---
gtk/channel-usbredir.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/gtk/channel-usbredir.c b/gtk/channel-usbredir.c
index 8b2d2f4..3d57152 100644
--- a/gtk/channel-usbredir.c
+++ b/gtk/channel-usbredir.c
@@ -297,6 +297,9 @@ void spice_usbredir_channel_connect_device_async(
{
SpiceUsbredirChannelPrivate *priv = channel->priv;
GSimpleAsyncResult *result;
+#if ! USE_POLKIT
+ GError *err = NULL;
+#endif
g_return_if_fail(SPICE_IS_USBREDIR_CHANNEL(channel));
g_return_if_fail(device != NULL);
@@ -335,7 +338,6 @@ void spice_usbredir_channel_connect_device_async(
channel);
return;
#else
- GError *err = NULL;
if (!spice_usbredir_channel_open_device(channel, &err)) {
g_simple_async_result_take_error(result, err);
libusb_unref_device(priv->device);
--
1.7.7.6
More information about the Spice-devel
mailing list