Re: [spice-gtk Win32 v2 PATCH 1/5] Move "err" variable definition to beginning of the function

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

 



Looks good, ack.

On 05/20/2012 06:34 PM, Uri Lublin wrote:
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);
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]