[grilo-plugins/wip/hadess/warnings-fixes: 5/11] tests: fix warnings on tmdb preconditions



commit 0c68c459b1dc0365301dd4755ea46f20fb48992d
Author: Victor Toso <me victortoso com>
Date:   Fri Oct 21 23:54:11 2016 +0200

    tests: fix warnings on tmdb preconditions
    
     warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     GrlSource *source = test_get_source();
     ^~~~~~~~~
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768557

 tests/tmdb/test_tmdb_preconditions.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tests/tmdb/test_tmdb_preconditions.c b/tests/tmdb/test_tmdb_preconditions.c
index 2a4ae7e..f5ce72d 100644
--- a/tests/tmdb/test_tmdb_preconditions.c
+++ b/tests/tmdb/test_tmdb_preconditions.c
@@ -34,12 +34,13 @@ test_preconditions (void)
   GrlMedia *media = NULL;
   GError *error = NULL;
   GrlOperationOptions *options = NULL;
+  GrlSource *source;
 
   test_setup_tmdb ();
 
   local_media = grl_media_audio_new ();
 
-  GrlSource *source = test_get_source();
+  source = test_get_source();
   g_assert (source);
   options = grl_operation_options_new (NULL);
   g_assert (options != NULL);
@@ -88,6 +89,8 @@ test_preconditions (void)
 int
 main(int argc, char **argv)
 {
+  gint result;
+
   g_setenv ("GRL_PLUGIN_PATH", GRILO_PLUGINS_TESTS_TMDB_PLUGIN_PATH, TRUE);
   g_setenv ("GRL_PLUGIN_LIST", TMDB_PLUGIN_ID, TRUE);
 
@@ -101,7 +104,7 @@ main(int argc, char **argv)
 
   g_test_add_func ("/tmdb/preconditions", test_preconditions);
 
-  gint result = g_test_run ();
+  result = g_test_run ();
 
   grl_deinit ();
 


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