[folks/wip/tintou/fix-vala-warnings] Fix several Vala warnings



commit 665e0ee043e5dc597ce3cb64a85c6ff498e5a2f0
Author: Corentin Noël <corentin elementary io>
Date:   Tue Feb 12 17:38:56 2019 +0100

    Fix several Vala warnings

 backends/eds/eds-backend.vala            |  2 +-
 backends/eds/lib/edsf-persona-store.vala |  2 +-
 tests/bluez/device-properties.vala       | 12 ++++++------
 tests/lib/bluez/backend.vala             | 14 +++++++-------
 tests/lib/eds/backend.vala               |  2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/backends/eds/eds-backend.vala b/backends/eds/eds-backend.vala
index fe297be5..4f0d2e05 100644
--- a/backends/eds/eds-backend.vala
+++ b/backends/eds/eds-backend.vala
@@ -30,7 +30,7 @@ extern const string BACKEND_NAME;
 
 /* The following function is needed in order to use the async SourceRegistry
  * constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
-[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", 
finish_function = "e_source_registry_new_finish")]
+[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = 
"e_source_registry_new_finish")]
 internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) 
throws GLib.Error;
 
 /**
diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala
index 320a05d5..33a10f2b 100644
--- a/backends/eds/lib/edsf-persona-store.vala
+++ b/backends/eds/lib/edsf-persona-store.vala
@@ -31,7 +31,7 @@ extern const string BACKEND_NAME;
 
 /* The following function is needed in order to use the async SourceRegistry
  * constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
-[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", 
finish_function = "e_source_registry_new_finish")]
+[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = 
"e_source_registry_new_finish")]
 internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) 
throws GLib.Error;
 
 /**
diff --git a/tests/bluez/device-properties.vala b/tests/bluez/device-properties.vala
index 19d806a5..3bd56274 100644
--- a/tests/bluez/device-properties.vala
+++ b/tests/bluez/device-properties.vala
@@ -46,7 +46,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
           this.bluez_backend.mock_bluez.add_device ("hci0",
               this.bluez_backend.primary_device_address, "My Phone");
         }
-      catch (IOError e1)
+      catch (GLib.Error e1)
         {
           error ("Error setting up mock BlueZ device: %s", e1.message);
         }
@@ -103,7 +103,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
           this.bluez_backend.mock_bluez.pair_device ("hci0",
               this.bluez_backend.primary_device_address);
         }
-      catch (IOError e4)
+      catch (GLib.Error e4)
         {
           error ("Error pairing mock BlueZ device: %s", e4.message);
         }
@@ -132,7 +132,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
           this.bluez_backend.mock_bluez.block_device ("hci0",
               this.bluez_backend.primary_device_address);
         }
-      catch (IOError e1)
+      catch (GLib.Error e1)
         {
           error ("Error blocking device: %s", e1.message);
         }
@@ -180,7 +180,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
           this.bluez_backend.mock_bluez.pair_device ("hci0",
               this.bluez_backend.primary_device_address);
         }
-      catch (IOError e4)
+      catch (GLib.Error e4)
         {
           error ("Error blocking device: %s", e4.message);
         }
@@ -201,7 +201,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
           this.bluez_backend.mock_bluez.block_device ("hci0",
               this.bluez_backend.primary_device_address);
         }
-      catch (IOError e5)
+      catch (GLib.Error e5)
         {
           error ("Error blocking device again: %s", e5.message);
         }
@@ -275,7 +275,7 @@ public class DevicePropertiesTests : BluezTest.TestCase
                 new Variant.array (VariantType.STRING, {})
               });
         }
-      catch (IOError e1)
+      catch (GLib.Error e1)
         {
           error ("Error setting device alias: %s", e1.message);
         }
diff --git a/tests/lib/bluez/backend.vala b/tests/lib/bluez/backend.vala
index 978fe555..023117e6 100644
--- a/tests/lib/bluez/backend.vala
+++ b/tests/lib/bluez/backend.vala
@@ -31,19 +31,19 @@ namespace org
           {
             [DBus (name = "AddAdapter")]
             public abstract string add_adapter (string device_name,
-                string system_name) throws IOError;
+                string system_name) throws GLib.Error;
 
             [DBus (name = "AddDevice")]
             public abstract string add_device (string adapter_device_name,
-                string device_address, string alias) throws IOError;
+                string device_address, string alias) throws GLib.Error;
 
             [DBus (name = "PairDevice")]
             public abstract void pair_device (string adapter_device_name,
-                string device_address) throws IOError;
+                string device_address) throws GLib.Error;
 
             [DBus (name = "BlockDevice")]
             public abstract void block_device (string adapter_device_name,
-                string device_address) throws IOError;
+                string device_address) throws GLib.Error;
           }
 
         namespace obex
@@ -65,7 +65,7 @@ namespace org
                   {
                     [DBus (name = "UpdateStatus")]
                     public abstract void update_status (bool is_complete)
-                        throws IOError;
+                        throws GLib.Error;
                   }
               }
           }
@@ -201,7 +201,7 @@ public class BluezTest.Backend
           this._mock_obex_base.reset ();
           this._mock_bluez_base.reset ();
         }
-      catch (IOError e1)
+      catch (GLib.Error e1)
         {
           error ("Error resetting python-dbusmock state: %s", e1.message);
         }
@@ -252,7 +252,7 @@ public class BluezTest.Backend
           /* Set the vCard to be returned for all transfers. */
           return this.set_simple_device_vcard (vcard);
         }
-      catch (IOError e1)
+      catch (GLib.Error e1)
         {
           error ("Error setting up mock BlueZ device: %s", e1.message);
         }
diff --git a/tests/lib/eds/backend.vala b/tests/lib/eds/backend.vala
index b907f206..22923ed5 100644
--- a/tests/lib/eds/backend.vala
+++ b/tests/lib/eds/backend.vala
@@ -24,7 +24,7 @@ using Random;
 
 /* The following function is needed in order to use the async SourceRegistry
  * constructor. FIXME: https://bugzilla.gnome.org/show_bug.cgi?id=659886 */
-[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", 
finish_function = "e_source_registry_new_finish")]
+[CCode (cname = "e_source_registry_new", cheader_filename = "libedataserver/libedataserver.h", finish_name = 
"e_source_registry_new_finish")]
 internal extern static async E.SourceRegistry create_source_registry (GLib.Cancellable? cancellable = null) 
throws GLib.Error;
 
 errordomain EdsTest.BackendSetupError


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