[gnome-software] trivial: Silence compiler warnings about constness



commit 3b9fa60018865c82d3b861ad272e31960d51d4ea
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Feb 11 22:51:08 2016 +0000

    trivial: Silence compiler warnings about constness
    
    Otherwise it makes it really hard to track down what the real build
    errors are.

 src/gs-category.c              |    4 ++--
 src/gs-plugin-loader.c         |    8 ++++----
 src/gs-shell-search-provider.c |    4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/gs-category.c b/src/gs-category.c
index 476c23f..a41b173 100644
--- a/src/gs-category.c
+++ b/src/gs-category.c
@@ -143,8 +143,8 @@ gs_category_add_subcategory (GsCategory *category, GsCategory *subcategory)
 static gint
 gs_category_sort_subcategories_cb (gconstpointer a, gconstpointer b)
 {
-       GsCategory *ca = GS_CATEGORY (a);
-       GsCategory *cb = GS_CATEGORY (b);
+       GsCategory *ca = GS_CATEGORY ((gpointer) a);
+       GsCategory *cb = GS_CATEGORY ((gpointer) b);
        const gchar *id_a = gs_category_get_id (ca);
        const gchar *id_b = gs_category_get_id (cb);
 
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index ccf3ebc..132ef86 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -106,8 +106,8 @@ G_DEFINE_QUARK (gs-plugin-loader-error-quark, gs_plugin_loader_error)
 static gint
 gs_plugin_loader_app_sort_cb (gconstpointer a, gconstpointer b)
 {
-       return g_strcmp0 (gs_app_get_name (GS_APP (a)),
-                         gs_app_get_name (GS_APP (b)));
+       return g_strcmp0 (gs_app_get_name (GS_APP ((gpointer) a)),
+                         gs_app_get_name (GS_APP ((gpointer) b)));
 }
 
 /**
@@ -1956,8 +1956,8 @@ gs_plugin_loader_search_what_provides_finish (GsPluginLoader *plugin_loader,
 static gint
 gs_plugin_loader_category_sort_cb (gconstpointer a, gconstpointer b)
 {
-       return g_strcmp0 (gs_category_get_name (GS_CATEGORY (a)),
-                         gs_category_get_name (GS_CATEGORY (b)));
+       return g_strcmp0 (gs_category_get_name (GS_CATEGORY ((gpointer) a)),
+                         gs_category_get_name (GS_CATEGORY ((gpointer) b)));
 }
 
 /**
diff --git a/src/gs-shell-search-provider.c b/src/gs-shell-search-provider.c
index b86d5e7..4666e06 100644
--- a/src/gs-shell-search-provider.c
+++ b/src/gs-shell-search-provider.c
@@ -63,8 +63,8 @@ static gint
 search_sort_by_kudo_cb (gconstpointer a, gconstpointer b)
 {
        guint pa, pb;
-       pa = gs_app_get_kudos_percentage (GS_APP (a));
-       pb = gs_app_get_kudos_percentage (GS_APP (b));
+       pa = gs_app_get_kudos_percentage (GS_APP ((gpointer) a));
+       pb = gs_app_get_kudos_percentage (GS_APP ((gpointer) b));
        if (pa < pb)
                return 1;
        else if (pa > pb)


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