tests: Fix unused variables and unreached code.
authorMurray Cumming <murrayc@murrayc.com>
Thu, 6 Dec 2012 13:01:12 +0000 (14:01 +0100)
committerMurray Cumming <murrayc@murrayc.com>
Thu, 6 Dec 2012 13:03:12 +0000 (14:03 +0100)
tests/rygel-media-engine-test.vala
tests/rygel-searchable-container-test.vala
tests/rygel-user-config-test.vala

index 2202f17..088061c 100644 (file)
@@ -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) {
index 767be40..4bd178f 100644 (file)
@@ -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 ();
index cd84632..94f6fd8 100644 (file)
@@ -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;
         }