[anjuta] Fix some warnings



commit 78053e16ed8607dd0e0c8debb4a43066ec41b51f
Author: Sébastien Granjoux <seb sfo free fr>
Date:   Sun Jun 18 09:18:32 2017 +0200

    Fix some warnings

 libanjuta/anjuta-convert.c        |    6 ++++--
 libanjuta/anjuta-plugin-manager.c |    8 +++-----
 libanjuta/anjuta-profile.c        |    4 ++--
 libanjuta/anjuta-status.c         |    4 +++-
 libanjuta/anjuta-token.c          |    2 +-
 5 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/libanjuta/anjuta-convert.c b/libanjuta/anjuta-convert.c
index e6c9690..0253de0 100644
--- a/libanjuta/anjuta-convert.c
+++ b/libanjuta/anjuta-convert.c
@@ -69,11 +69,13 @@ anjuta_convert_to_utf8_from_charset (const gchar  *content,
                                        
                        return g_strndup (content, len);
                }
-               else    
+               else
+               {
                        g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
                                     _("The file you are trying to open contains an invalid byte sequence."));
                
-                       return NULL;    
+                       return NULL;
+               }
        }
        
        converted_contents = g_convert (content, 
diff --git a/libanjuta/anjuta-plugin-manager.c b/libanjuta/anjuta-plugin-manager.c
index a84307d..b7cc7e5 100644
--- a/libanjuta/anjuta-plugin-manager.c
+++ b/libanjuta/anjuta-plugin-manager.c
@@ -136,7 +136,7 @@ anjuta_plugin_manager_error_quark (void)
        return quark;
 }
 
-/** Dependency Resolution **/
+/* Dependency Resolution */
 
 static gboolean
 collect_cycle (AnjutaPluginManager *plugin_manager,
@@ -1035,8 +1035,6 @@ foreach_remembered_plugin (gpointer key, gpointer value, gpointer user_data)
 {
        AnjutaPluginHandle *handle = (AnjutaPluginHandle *) value;
        GtkListStore *store = GTK_LIST_STORE (user_data);
-       AnjutaPluginManager *manager = g_object_get_data (G_OBJECT (store),
-                                                                                                         
"plugin-manager");
        
        if (anjuta_plugin_handle_get_name (handle) &&
                anjuta_plugin_handle_get_description (handle))
@@ -2678,8 +2676,8 @@ anjuta_plugin_manager_set_remembered_plugins (AnjutaPluginManager *plugin_manage
 /**
  * anjuta_plugin_manager_set_disable_plugins:
  * @plugin_manager: A #AnjutaPluginManager object
- * @plugins_list: A list of plugins to disable or reenable
- * @hide: %TRUE to disable, %FALSE to re-enable plugins in the list
+ * @plugin_handles: A list of plugins to disable or reenable
+ * @disable: %TRUE to disable, %FALSE to re-enable plugins in the list
  *
  * Disable or re-enable plugins. By default, all plugins are enabled but they
  * can be disabled and they will not be proposed when a plugin is requested.
diff --git a/libanjuta/anjuta-profile.c b/libanjuta/anjuta-profile.c
index b605a9d..4979c46 100644
--- a/libanjuta/anjuta-profile.c
+++ b/libanjuta/anjuta-profile.c
@@ -338,7 +338,7 @@ anjuta_profile_class_init (AnjutaProfileClass *klass)
                              G_SIGNAL_RUN_FIRST,
                              G_STRUCT_OFFSET (AnjutaProfileClass, changed),
                              NULL, NULL,
-                             anjuta_cclosure_marshal_VOID__POINTER,
+                             anjuta_cclosure_marshal_VOID__VOID,
                              G_TYPE_NONE, 0);
 
        /**
@@ -1372,7 +1372,7 @@ anjuta_profile_load (AnjutaProfile *profile, GError **error)
 }
 
 /**
- * anjuta_profile_load:
+ * anjuta_profile_unload:
  * @profile: a #AnjutaProfile object.
  * @error: error propagation and reporting.
  *
diff --git a/libanjuta/anjuta-status.c b/libanjuta/anjuta-status.c
index 2dacbae..9500b4d 100644
--- a/libanjuta/anjuta-status.c
+++ b/libanjuta/anjuta-status.c
@@ -290,6 +290,7 @@ anjuta_status_busy_push (AnjutaStatus *status)
        GtkWidget *top;
        GdkCursor *cursor;
        GdkWindow *window;
+       GdkDisplay *display;
        
        g_return_if_fail (ANJUTA_IS_STATUS (status));
        
@@ -303,7 +304,8 @@ anjuta_status_busy_push (AnjutaStatus *status)
        
        if (status->priv->busy_count > 1)
                return;
-       cursor = gdk_cursor_new (GDK_WATCH);
+       display = gtk_widget_get_display (top);
+       cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
        window = gtk_widget_get_window (top);
        if (window)
                gdk_window_set_cursor (window, cursor);
diff --git a/libanjuta/anjuta-token.c b/libanjuta/anjuta-token.c
index 291b7cf..55a2056 100644
--- a/libanjuta/anjuta-token.c
+++ b/libanjuta/anjuta-token.c
@@ -585,7 +585,7 @@ anjuta_token_first_item (AnjutaToken *list)
 AnjutaToken *
 anjuta_token_next_item (AnjutaToken *item)
 {
-       AnjutaToken *next;
+       AnjutaToken *next = NULL;
 
        if (item != NULL)
        {


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