[nautilus] shell-search-provider: cast pointers to drop const qualifier



commit d96a0c46b72654adf667980109fdda2466f5d575
Author: Razvan Chitu <razvan ch95 gmail com>
Date:   Wed Oct 5 14:17:18 2016 +0300

    shell-search-provider: cast pointers to drop const qualifier
    
    The type check instance cast macros provided by GLib produce compiler warnings
    when used on const pointers. In order to fix this, cast the pointers to
    the non-const variant.

 src/nautilus-shell-search-provider.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index a2ab54c..f91f864 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -181,8 +181,8 @@ search_hit_compare_relevance (gconstpointer a,
     NautilusSearchHit *hit_a, *hit_b;
     gdouble relevance_a, relevance_b;
 
-    hit_a = NAUTILUS_SEARCH_HIT (a);
-    hit_b = NAUTILUS_SEARCH_HIT (b);
+    hit_a = NAUTILUS_SEARCH_HIT ((gpointer) a);
+    hit_b = NAUTILUS_SEARCH_HIT ((gpointer) b);
 
     relevance_a = nautilus_search_hit_get_relevance (hit_a);
     relevance_b = nautilus_search_hit_get_relevance (hit_b);


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