[rygel] tests: Fix unused variables and unreached code.



commit bc7827287c52965b01ee7e47ae45ee4621500b5a
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Dec 6 14:01:12 2012 +0100

    tests: Fix unused variables and unreached code.

 tests/rygel-media-engine-test.vala         |    4 ----
 tests/rygel-searchable-container-test.vala |    1 -
 tests/rygel-user-config-test.vala          |    1 +
 3 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/tests/rygel-media-engine-test.vala b/tests/rygel-media-engine-test.vala
index 2202f17..088061c 100644
--- a/tests/rygel-media-engine-test.vala
+++ b/tests/rygel-media-engine-test.vala
@@ -365,8 +365,6 @@ public class Rygel.DataSourceTest : Object {
 
         var timeout_id = Timeout.add_seconds (5, () => {
             assert_not_reached ();
-
-            return false;
         });
 
         source.thaw ();
@@ -465,8 +463,6 @@ public class Rygel.DataSourceTest : Object {
     }
 
     public static int main (string[] args) {
-        string[] engines;
-
         var configs = new Gee.ArrayList<DataSourceTestConfig> ();
 
         if (args.length > 1) {
diff --git a/tests/rygel-searchable-container-test.vala b/tests/rygel-searchable-container-test.vala
index 767be40..4bd178f 100644
--- a/tests/rygel-searchable-container-test.vala
+++ b/tests/rygel-searchable-container-test.vala
@@ -151,7 +151,6 @@ public class MediaObjects : Gee.ArrayList<MediaObject> {
 
 int main ()
 {
-    var loop = new MainLoop ();
     var c = new TestContainer ();
     c.loop = new MainLoop ();
     c.test_search_no_limit.begin ();
diff --git a/tests/rygel-user-config-test.vala b/tests/rygel-user-config-test.vala
index cd84632..94f6fd8 100644
--- a/tests/rygel-user-config-test.vala
+++ b/tests/rygel-user-config-test.vala
@@ -354,6 +354,7 @@ public class Rygel.UserConfigTest : GLib.Object {
         try {
             var config = new UserConfig.with_paths (LOCAL_CONFIG,
                                                     SYSTEM_CONFIG);
+            assert (config != null);
         } catch (Error e) {
             failed = true;
         }



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