[gom] tests: Fix build warnings



commit d738e73e5fef84593ac2968dc2489a5ea569e7d7
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Sep 21 18:53:07 2014 +0200

    tests: Fix build warnings
    
    Unused variables and missing declarations.

 tests/test-gom-constraints.c   |    2 ++
 tests/test-gom-find-specific.c |    5 ++---
 tests/test-gom-find.c          |    2 ++
 tests/test-gom-insert.c        |    7 ++++---
 tests/test-gom-migration.c     |    2 ++
 tests/test-gom-stress.c        |    2 ++
 tests/test-gom-transform.c     |    2 ++
 7 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/tests/test-gom-constraints.c b/tests/test-gom-constraints.c
index d866b11..518ceb8 100644
--- a/tests/test-gom-constraints.c
+++ b/tests/test-gom-constraints.c
@@ -26,6 +26,8 @@ typedef struct {
   GomResourceClass parent_class;
 } ItemResourceClass;
 
+GType item_resource_get_type(void);
+
 G_DEFINE_TYPE(ItemResource, item_resource, GOM_TYPE_RESOURCE)
 
 enum {
diff --git a/tests/test-gom-find-specific.c b/tests/test-gom-find-specific.c
index 515a90f..30f6507 100644
--- a/tests/test-gom-find-specific.c
+++ b/tests/test-gom-find-specific.c
@@ -2,7 +2,6 @@
 #include <glib/gstdio.h>
 
 static GMainLoop *gMainLoop;
-static char *db_dir_path = NULL;
 
 /* EpisodeResource object */
 
@@ -41,6 +40,8 @@ typedef struct
    GomResourceClass parent_class;
 } EpisodeResourceClass;
 
+GType episode_resource_get_type(void);
+
 G_DEFINE_TYPE(EpisodeResource, episode_resource, GOM_TYPE_RESOURCE)
 
 enum {
@@ -266,7 +267,6 @@ static void
 find_simple (void)
 {
   GError *error = NULL;
-  gboolean ret;
   GValue value = { 0, };
   GomFilter *filter;
   char *s1, *s2;
@@ -316,7 +316,6 @@ static void
 find_specific (void)
 {
   GError *error = NULL;
-  gboolean ret;
   GValue value = { 0, };
   GomFilter *filter1, *filter2, *filter3, *filter4, *filter5;
   char *s1, *s2;
diff --git a/tests/test-gom-find.c b/tests/test-gom-find.c
index 566ad99..aed010e 100644
--- a/tests/test-gom-find.c
+++ b/tests/test-gom-find.c
@@ -31,6 +31,8 @@ typedef struct {
   GomResourceClass parent_class;
 } BookmarksResourceClass;
 
+GType bookmarks_resource_get_type(void);
+
 G_DEFINE_TYPE(BookmarksResource, bookmarks_resource, GOM_TYPE_RESOURCE)
 
 enum {
diff --git a/tests/test-gom-insert.c b/tests/test-gom-insert.c
index 2a36c7a..7b91f3c 100644
--- a/tests/test-gom-insert.c
+++ b/tests/test-gom-insert.c
@@ -35,6 +35,8 @@ typedef struct {
   GomResourceClass parent_class;
 } ItemResourceClass;
 
+GType item_resource_get_type(void);
+
 G_DEFINE_TYPE(ItemResource, item_resource, GOM_TYPE_RESOURCE)
 
 static GParamSpec *item_specs[LAST_PROP];
@@ -170,6 +172,8 @@ typedef struct {
   GomResourceClass parent_class;
 } Item2ResourceClass;
 
+GType item2_resource_get_type(void);
+
 G_DEFINE_TYPE(Item2Resource, item2_resource, GOM_TYPE_RESOURCE)
 
 static GParamSpec *item2_specs[LAST_PROP];
@@ -356,9 +360,6 @@ stress_item2 (void)
    gboolean ret;
    GomRepository *repository;
    GList *object_types;
-   GValue value = { 0, };
-   GomFilter *filter;
-   char *s1, *s2;
    Item2Resource *it;
    int id, id2;
 
diff --git a/tests/test-gom-migration.c b/tests/test-gom-migration.c
index df73d62..876ce36 100644
--- a/tests/test-gom-migration.c
+++ b/tests/test-gom-migration.c
@@ -30,6 +30,8 @@ typedef struct {
   GomResourceClass parent_class;
 } BookmarksResourceClass;
 
+GType bookmarks_resource_get_type(void);
+
 G_DEFINE_TYPE(BookmarksResource, bookmarks_resource, GOM_TYPE_RESOURCE)
 
 enum {
diff --git a/tests/test-gom-stress.c b/tests/test-gom-stress.c
index 7c2da7b..606f304 100644
--- a/tests/test-gom-stress.c
+++ b/tests/test-gom-stress.c
@@ -25,6 +25,8 @@ typedef struct {
   GomResourceClass parent_class;
 } ItemResourceClass;
 
+GType item_resource_get_type(void);
+
 G_DEFINE_TYPE(ItemResource, item_resource, GOM_TYPE_RESOURCE)
 
 enum {
diff --git a/tests/test-gom-transform.c b/tests/test-gom-transform.c
index 3a81fea..5a452ba 100644
--- a/tests/test-gom-transform.c
+++ b/tests/test-gom-transform.c
@@ -28,6 +28,8 @@ typedef struct {
   GomResourceClass parent_class;
 } ItemResourceClass;
 
+GType item_resource_get_type(void);
+
 G_DEFINE_TYPE(ItemResource, item_resource, GOM_TYPE_RESOURCE)
 
 enum {


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