r1360 - trunk/src/target/OM-2007/applications/openmoko-mainmenu/src

ken_zhao at sita.openmoko.org ken_zhao at sita.openmoko.org
Wed Mar 14 07:55:36 CET 2007


Author: ken_zhao
Date: 2007-03-14 07:55:33 +0100 (Wed, 14 Mar 2007)
New Revision: 1360

Modified:
   trunk/src/target/OM-2007/applications/openmoko-mainmenu/src/callbacks.c
Log:
remove compile warnings for openmoko-mainmenu:callbacks.c


Modified: trunk/src/target/OM-2007/applications/openmoko-mainmenu/src/callbacks.c
===================================================================
--- trunk/src/target/OM-2007/applications/openmoko-mainmenu/src/callbacks.c	2007-03-14 06:33:10 UTC (rev 1359)
+++ trunk/src/target/OM-2007/applications/openmoko-mainmenu/src/callbacks.c	2007-03-14 06:55:33 UTC (rev 1360)
@@ -112,7 +112,7 @@
 		moko_dbus_send_message (text);
 	}
 
-	g_list_foreach (selected_item, gtk_tree_path_free, NULL);
+	g_list_foreach (selected_item, (GFunc) gtk_tree_path_free, NULL);
 	g_list_free (selected_item);
 
     moko_main_menu_update_item_total_label (mma->mm);
@@ -121,17 +121,21 @@
 void 
 moko_tool_box_btn_clicked_cb (GtkButton *btn, MokoAppHistory *history)
 {
-	MokoDesktopItem *selected_item;
+	MokoDesktopItem *selected_item = NULL;
 	gint i = 0;
 
     if (!btn || !history)
 		return;
 
-	for (i; i<MAX_RECORD_APP; i++)
+	for ( ; i<MAX_RECORD_APP; i++)
 	{
-		if (history->btn[i] == btn)
+		if (history->btn[i] == (MokoPixmapButton *)btn)
+		{
 			selected_item = history->item[i];
-		else continue;
+			break;
+		}
+		else
+			continue;
 	}
 	
 	if (selected_item)





More information about the commitlog mailing list