[grilo-plugins/wip/hadess/warnings-fixes: 2/11] tests: fix warnings on thetvdb resolve stress



commit cdd42ba232f38440877bb8879d244f0b87665619
Author: Victor Toso <me victortoso com>
Date:   Fri Oct 21 23:42:45 2016 +0200

    tests: fix warnings on thetvdb resolve stress
    
    -Wdiscarded-qualifiers and -Wdeclaration-after-statement such as:
    
    -Wdiscarded-qualifiers
     warning: initialization discards ‘const’ qualifier from pointer target type
     {"House", "Everybody Dies", 8, 22,
      ^~~~~~~
    
    -Wdeclaration-after-statement
     warning: ISO C90 forbids mixed declarations and code
     gint result = g_test_run ();
     ^~~~
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768557

 tests/thetvdb/test_thetvdb_resolve_stress.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/tests/thetvdb/test_thetvdb_resolve_stress.c b/tests/thetvdb/test_thetvdb_resolve_stress.c
index ce95756..1840a60 100644
--- a/tests/thetvdb/test_thetvdb_resolve_stress.c
+++ b/tests/thetvdb/test_thetvdb_resolve_stress.c
@@ -30,15 +30,15 @@ static GMainLoop *main_loop = NULL;
 static GrlKeyID tvdb_key, imdb_key, zap2it_key, ss_key;
 
 static struct {
-  gchar *show;
-  gchar *title;
+  const gchar *show;
+  const gchar *title;
   gint   season;
   gint   episode;
-  gchar *imdb;
-  gchar *tvdb_id;
-  gchar *zap2it_id;
-  gchar *publication_date;
-  gchar *url_episode_screen;
+  const gchar *imdb;
+  const gchar *tvdb_id;
+  const gchar *zap2it_id;
+  const gchar *publication_date;
+  const gchar *url_episode_screen;
 } videos[] = {
   {"House", "Now What?", 7, 1,
     "tt1697219", "2495251","EP00688359","2010-09-20",
@@ -296,6 +296,8 @@ test_episodes_stress (void)
 gint
 main (gint argc, gchar **argv)
 {
+  gint result;
+
   g_setenv ("GRL_PLUGIN_PATH", THETVDB_PLUGIN_PATH, TRUE);
   g_setenv ("GRL_PLUGIN_LIST", THETVDB_ID, TRUE);
   g_setenv ("GRL_NET_MOCKED", THETVDB_PLUGIN_TEST_DATA_PATH "config.ini", TRUE);
@@ -307,7 +309,7 @@ main (gint argc, gchar **argv)
 
   g_test_add_func ("/thetvdb/resolve/episodes_from_episode", test_episodes_stress);
 
-  gint result = g_test_run ();
+  result = g_test_run ();
 
   test_shutdown_thetvdb ();
 


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