[Spice-commits] gtk/channel-usbredir.c

Uri Lublin uril at kemper.freedesktop.org
Sun Jun 24 07:30:00 PDT 2012


 gtk/channel-usbredir.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 713f52e04d479b9a7d7b3a893950c8b35b390da2
Author: Uri Lublin <uril at redhat.com>
Date:   Sun May 6 11:30:01 2012 +0300

    Move "err" variable definition to beginning of the function
    
    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]

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);


More information about the Spice-commits mailing list