[Commits] [SCM] claws branch, master, updated. 3.16.0-150-gdc727e2

wwp at claws-mail.org wwp at claws-mail.org
Sat May 5 14:00:47 CEST 2018


The branch, master has been updated
       via  dc727e2883aae254df9cb16ad7deb106e446c697 (commit)
      from  ea9b5f54bfdc77fa726d2fb2b0767cec46f4f3c6 (commit)

Summary of changes:
 src/addr_compl.c                        |    2 +-
 src/addr_compl.h                        |    2 +-
 src/gtk/gtkcmoptionmenu.c               |   15 +++++++--------
 src/ldapctrl.c                          |    4 ++--
 src/main.c                              |    2 +-
 src/messageview.c                       |    2 +-
 src/plugins/pdf_viewer/poppler_viewer.c |    2 +-
 src/summaryview.c                       |    2 +-
 8 files changed, 15 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit dc727e2883aae254df9cb16ad7deb106e446c697
Author: wwp <wwp at free.fr>
Date:   Sat May 5 13:46:36 2018 +0200

    Save few warnings around mistyped uses of g_list_length().

diff --git a/src/addr_compl.c b/src/addr_compl.c
index 9cf536a..8ce1177 100644
--- a/src/addr_compl.c
+++ b/src/addr_compl.c
@@ -437,7 +437,7 @@ static void clear_completion_cache(void)
  * address completion.
  * \return The number of addresses in the completion list.
  */
-gint start_address_completion(gchar *folderpath)
+guint start_address_completion(gchar *folderpath)
 {
 	gboolean different_book = FALSE;
 	clear_completion_cache();
diff --git a/src/addr_compl.h b/src/addr_compl.h
index 741fa43..bd1ed78 100644
--- a/src/addr_compl.h
+++ b/src/addr_compl.h
@@ -36,7 +36,7 @@ typedef struct
     GList *grp_emails;
 } address_entry;
 
-gint start_address_completion		(gchar *folderpath);
+guint start_address_completion		(gchar *folderpath);
 guint complete_address			(const gchar *str);
 guint complete_matches_found				(const gchar *str);
 gchar *get_complete_address		(gint index);
diff --git a/src/gtk/gtkcmoptionmenu.c b/src/gtk/gtkcmoptionmenu.c
index b07694f..1f7fb31 100644
--- a/src/gtk/gtkcmoptionmenu.c
+++ b/src/gtk/gtkcmoptionmenu.c
@@ -1019,19 +1019,18 @@ gtk_cmoption_menu_scroll_event (GtkWidget          *widget,
 			      GdkEventScroll     *event)
 {
   GtkCMOptionMenu *option_menu = GTK_CMOPTION_MENU (widget);
-  gint index;
-  gint n_children;
+  gint index, n_children;
   gint index_dir;
   GList *l, *children;
   GtkMenuItem *item;
-    
+
   index = gtk_cmoption_menu_get_history (option_menu);
 
   if (index != -1)
     {
       children = gtk_container_get_children (GTK_CONTAINER (GTK_MENU_SHELL (option_menu->menu)));
-      n_children = g_list_length (children);
-      
+      n_children = (gint)g_list_length (children);
+ 
       if (event->direction == GDK_SCROLL_UP)
 	index_dir = -1;
       else
@@ -1047,7 +1046,7 @@ gtk_cmoption_menu_scroll_event (GtkWidget          *widget,
 	  if (index >= n_children)
 	    break;
 
-	  l = g_list_nth (children, index);
+	  l = g_list_nth (children, (guint)index);
 	  item = GTK_MENU_ITEM (l->data);
 	  if (gtk_widget_get_visible (GTK_WIDGET(item)) && 
 	      gtk_widget_is_sensitive (GTK_WIDGET(item)))
@@ -1056,9 +1055,9 @@ gtk_cmoption_menu_scroll_event (GtkWidget          *widget,
 	      gtk_menu_item_activate (GTK_MENU_ITEM (item));
 	      break;
 	    }
-	      
+
 	}
-      
+
 	g_list_free (children);
     }
 
diff --git a/src/ldapctrl.c b/src/ldapctrl.c
index ddc8c25..2bba4f6 100644
--- a/src/ldapctrl.c
+++ b/src/ldapctrl.c
@@ -594,7 +594,7 @@ gchar *ldapctl_format_criteria( LdapControl *ctl, const gchar *searchVal ) {
 char **ldapctl_attribute_array( LdapControl *ctl ) {
 	char **ptrArray;
 	GList *node;
-	gint cnt, i;
+	guint cnt, i;
 	cm_return_val_if_fail( ctl != NULL, NULL );
 
 	node = ctl->listCriteria;
@@ -619,7 +619,7 @@ char **ldapctl_full_attribute_array( LdapControl *ctl ) {
 	char **ptrArray;
 	GList *node, *def;
 	GList *tmp = NULL;
-	gint cnt, i;
+	guint cnt, i;
 	cm_return_val_if_fail( ctl != NULL, NULL );
 
 	def = ctl->listCriteria;
diff --git a/src/main.c b/src/main.c
index 89e51e9..bf3a31e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -987,7 +987,7 @@ int main(int argc, char *argv[])
 	FolderView *folderview;
 	GdkPixbuf *icon;
 	gboolean crash_file_present = FALSE;
-	gint num_folder_class = 0;
+	guint num_folder_class = 0;
 	gboolean asked_for_migration = FALSE;
 	gboolean start_done = TRUE;
 	GSList *plug_list = NULL;
diff --git a/src/messageview.c b/src/messageview.c
index 4dfb090..95d851f 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -1204,7 +1204,7 @@ static void messageview_register_nav(MessageView *messageview)
 			}
 		}
 		messageview->trail = g_list_append(messageview->trail, id);
-		messageview->trail_pos = g_list_length(messageview->trail) - 1;
+		messageview->trail_pos = (gint)g_list_length(messageview->trail) - 1;
 		
 		/* Cut the beginning if needed */
 		while (messageview->trail_pos > prefs_common.nav_history_length) {
diff --git a/src/plugins/pdf_viewer/poppler_viewer.c b/src/plugins/pdf_viewer/poppler_viewer.c
index 8949098..33ab2d2 100644
--- a/src/plugins/pdf_viewer/poppler_viewer.c
+++ b/src/plugins/pdf_viewer/poppler_viewer.c
@@ -449,7 +449,7 @@ static gboolean	pdf_viewer_text_search(MimeViewer *_viewer, gboolean backward,
 			if (viewer->page_results != NULL) {
 				debug_print("page_results %p\n", viewer->page_results);
 				/* store results for this page */
-				gint num_res = 0;
+				guint num_res = 0;
 				PageResult *res = g_new0(PageResult, 1);
 				res->results = viewer->page_results;
 				res->page_num = i;
diff --git a/src/summaryview.c b/src/summaryview.c
index 7a1bc87..cb3d125 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -4478,7 +4478,7 @@ void summary_delete(SummaryView *summaryview)
 
 	if (!prefs_common.live_dangerously) {
 		gchar *buf = NULL;
-		int num = g_list_length(GTK_CMCLIST(summaryview->ctree)->selection);
+		guint num = g_list_length(GTK_CMCLIST(summaryview->ctree)->selection);
 		buf = g_strdup_printf(ngettext(
 			"Do you really want to delete the selected message?",
 			"Do you really want to delete the %d selected messages?", num),

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list