/soc/2015/igor.gajowiak/chatlog: cc25d5bfd70d: Fixed gcc compila...

Igor Gajowiak igor.gajowiak at gmail.com
Sun Aug 16 12:54:51 EDT 2015


Changeset: cc25d5bfd70d159e816b544c171421711245345b
Author:	 Igor Gajowiak <igor.gajowiak at gmail.com>
Date:	 2015-08-16 18:54 +0200
Branch:	 default
URL: https://hg.pidgin.im/soc/2015/igor.gajowiak/chatlog/rev/cc25d5bfd70d

Description:

Fixed gcc compilation isssues.

diffstat:

 libpurple/accounts.c              |   3 ++-
 libpurple/genericlog.c            |   9 ++++++---
 libpurple/plugins/log/legacylog.c |  12 ++++++++----
 pidgin/gtkgenericlog.c            |   9 ++++++---
 4 files changed, 22 insertions(+), 11 deletions(-)

diffs (122 lines):

diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -934,7 +934,8 @@ show_unseen_im_msgs(PurpleConnection *gc
 	if (!purple_genericlog_get_unseen_msgs(account, &unseen_msgs, NULL))
 		return;
 
-	for(GList *it = unseen_msgs; it != NULL; it = it->next) {
+	GList *it;
+	for(it = unseen_msgs; it != NULL; it = it->next) {
 		PurpleMessage *msg = it->data;
 
 		purple_message_set_flags(msg, purple_message_get_flags(msg) |
diff --git a/libpurple/genericlog.c b/libpurple/genericlog.c
--- a/libpurple/genericlog.c
+++ b/libpurple/genericlog.c
@@ -407,7 +407,8 @@ run_import_iteration(gpointer unused)
 
 	g_assert(accounts->len == messages->len);
 
-	for (guint i = 0; i < messages->len; ++i) {
+	guint i;
+	for (i = 0; i < messages->len; ++i) {
 		PurpleAccount *account = g_array_index(accounts, PurpleAccount*, i);
 		PurpleBlistNode *contact = g_array_index(contacts, PurpleBlistNode*, i);
 		PurpleMessage *message = g_array_index(messages, PurpleMessage*, i);
@@ -633,7 +634,8 @@ void
 purple_genericlog_init(void)
 {
 	GList *plugins = purple_plugins_find_all();
-	for (GList *it = plugins; it != NULL; it = it->next) {
+	GList *it;
+	for (it = plugins; it != NULL; it = it->next) {
 		PurplePlugin *plugin = PURPLE_PLUGIN(it->data);
 		PurplePluginInfo *info = purple_plugin_get_info(plugin);
 
@@ -664,7 +666,8 @@ purple_genericlog_uninit(void)
 		purple_debug_error("genericlog", "Setting active log to NULL failed");
 	}
 
-	for (GList *it = purple_genericlog_loaded_plugins; it != NULL;
+	GList *it;
+	for (it = purple_genericlog_loaded_plugins; it != NULL;
 		 it = g_list_next(it))
 	{
 		PurplePlugin *plugin = PURPLE_PLUGIN(it->data);
diff --git a/libpurple/plugins/log/legacylog.c b/libpurple/plugins/log/legacylog.c
--- a/libpurple/plugins/log/legacylog.c
+++ b/libpurple/plugins/log/legacylog.c
@@ -254,7 +254,8 @@ is_end_iter(const Iter *iter)
 {
 	unsigned init_count = 0;
 
-	for (unsigned i = 0; i < DIR_DEPTH_MAX; ++i) {
+	unsigned i;
+	for (i = 0; i < DIR_DEPTH_MAX; ++i) {
 		g_assert(!iter->dirs[i] == !iter->dir_paths[i]);
 
 		init_count += iter->dirs[i] ? 1 : 0;
@@ -291,7 +292,8 @@ uninit_iter(Iter *iter)
 		iter->log_file = NULL;
 	}
 
-	for (guint i = 0; i < DIR_DEPTH_MAX; ++i)
+	guint i;
+	for (i = 0; i < DIR_DEPTH_MAX; ++i)
 		uninit_iter_at_depth(iter, i);
 }
 
@@ -424,7 +426,8 @@ remove_divs(gchar *text)
 	size_t len = strlen(text);
 	GString *result = g_string_new("");
 
-	for (size_t i = 0; i < len && text[i] != '\0';) {
+	size_t i;
+	for (i = 0; i < len && text[i] != '\0';) {
 		if (len - i >= 5 && g_str_has_prefix(&text[i], "<div>")) {
 			i += 5;
 		}
@@ -675,7 +678,8 @@ init_protocol_icon_to_id_hash()
 
 	GList *protocols = purple_protocols_get_all();
 
-	for (GList *it = protocols; it != NULL; it = it->next) {
+	GList *it;
+	for (it = protocols; it != NULL; it = it->next) {
 		PurpleProtocol *protocol = PURPLE_PROTOCOL(it->data);
 
 		g_hash_table_insert(res,
diff --git a/pidgin/gtkgenericlog.c b/pidgin/gtkgenericlog.c
--- a/pidgin/gtkgenericlog.c
+++ b/pidgin/gtkgenericlog.c
@@ -712,7 +712,8 @@ populate_buddylist_store(GtkTreeStore *s
 	GHashTable *branches = g_hash_table_new_full(g_direct_hash, g_direct_equal,
 		g_object_unref, g_free);
 
-	for (GList *it = contacts; it != NULL; it = g_list_next(it)) {
+	GList *it;
+	for (it = contacts; it != NULL; it = g_list_next(it)) {
 		append_contact(store, branches, PURPLE_BLIST_NODE(it->data));
 	}
 
@@ -1090,7 +1091,8 @@ populate_calendar_store(PurpleBlistNode 
 	struct tm curr_group_time = *localtime(&timestamp);
 	append_new_calendar_group(store, &curr_group, &curr_group_time);
 
-	for (guint i = 0; i < days->len; ++i) {
+	guint i;
+	for (i = 0; i < days->len; ++i) {
 		timestamp = (time_t) g_array_index(days, guint64, i);
 
 		/* Start a new group if year or month changed */
@@ -1210,7 +1212,8 @@ clear_webview(PidginWebView *webview)
 static void
 fill_webview(PidginGenericLogViewer *viewer, GList *messages)
 {
-	for (GList *it = messages; it != NULL; it = it->next) {
+	GList * it;
+	for (it = messages; it != NULL; it = it->next) {
 		gchar *script = prepare_script(PURPLE_MESSAGE(it->data), viewer->theme);
 
 		pidgin_webview_safe_execute_script(PIDGIN_WEBVIEW(viewer->webview),



More information about the Commits mailing list