phonemgr r334 - in trunk: . libgsm src



Author: hadess
Date: Wed Feb  4 16:55:41 2009
New Revision: 334
URL: http://svn.gnome.org/viewvc/phonemgr?rev=334&view=rev

Log:
2009-02-04  Bastien Nocera  <hadess hadess net>

	* libgsm/phonemgr-listener.c (phonemgr_listener_push),
	(phonemgr_listener_new_sms_cb), (phonemgr_listener_new_call_cb),
	(phonemgr_listener_cell_not_cb),
	(phonemgr_listener_parse_data_uuid), (phonemgr_listener_get_data),
	(phonemgr_listener_delete_data):
	* src/main.c:
	* src/phonemgr-chooser-button.c (set_btdevname),
	(phonemgr_chooser_button_class_init):
	* src/phonemgr-object.h:
	* src/ui.c (populate_prefs): Loads of warning fixes



Modified:
   trunk/ChangeLog
   trunk/libgsm/phonemgr-listener.c
   trunk/src/main.c
   trunk/src/phonemgr-chooser-button.c
   trunk/src/phonemgr-object.h
   trunk/src/ui.c

Modified: trunk/libgsm/phonemgr-listener.c
==============================================================================
--- trunk/libgsm/phonemgr-listener.c	(original)
+++ trunk/libgsm/phonemgr-listener.c	Wed Feb  4 16:55:41 2009
@@ -519,7 +519,7 @@
 {
 	AsyncSignal *signal;
 
-	g_return_if_fail (l->connected != FALSE);
+	g_return_val_if_fail (l->connected != FALSE, FALSE);
 
 	signal = g_async_queue_try_pop (l->queue);
 	if (signal == NULL)
@@ -584,7 +584,7 @@
 	else if (message->type == GN_SMS_MT_Deliver)
 		type = MESSAGE_SIGNAL;
 	else
-		return;
+		return GN_ERR_NONE;
 
 	signal = g_new0 (AsyncSignal, 1);
 	signal->type = type;
@@ -649,7 +649,6 @@
 phonemgr_listener_new_call_cb (gn_call_status call_status, gn_call_info *call_info, struct gn_statemachine *state, void *user_data)
 {
 	PhonemgrListener *l = (PhonemgrListener *) user_data;
-	PhonemgrListenerCallStatus status;
 
 	/* We should ignore things that aren't the first call, but we have no idea of what
 	 * call ID the drivers might be using */
@@ -672,7 +671,7 @@
 	else
 		cid = (info->cell_id[0] << 24) + (info->cell_id[1] << 16) + (info->cell_id[2] << 8) + info->cell_id[3];
 
-	lac = info->LAC[0] << 8 + info->LAC[1];
+	lac = (info->LAC[0] << 8) + info->LAC[1];
 
 	/* Is it the same cells? */
 	if (lac == l->lac && cid == l->cid)
@@ -1192,7 +1191,7 @@
 	if (strlen(s) < 5)
 		return FALSE;
 
-	if (memory_type != NULL) {
+	if (type != NULL) {
 		memory_type = g_strndup (s + 1, 2);
 		*type = gn_str2memory_type (memory_type);
 		g_free (memory_type);
@@ -1235,7 +1234,6 @@
 			gn_phonebook_entry entry;
 			gn_memory_type memory_type;
 			char *retval;
-			gn_error error;
 			int index;
 
 			if (phonemgr_listener_parse_data_uuid (dataid, &memory_type, &index) == FALSE)
@@ -1264,7 +1262,7 @@
 		{
 			gn_calnote_list calnote_list;
 			gn_calnote calnote;
-			char *memory_type, *retval;
+			char *retval;
 			gn_error error;
 			int index;
 
@@ -1420,7 +1418,6 @@
 		{
 			gn_phonebook_entry entry;
 			gn_memory_type memory_type;
-			char *retval;
 			gn_error error;
 			int index;
 
@@ -1446,7 +1443,6 @@
 		{
 			gn_calnote_list calnote_list;
 			gn_calnote calnote;
-			char *memory_type;
 			gn_error error;
 			int index;
 

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Wed Feb  4 16:55:41 2009
@@ -26,6 +26,7 @@
 #include <glib/gi18n.h>
 
 #include "phonemgr-object.h"
+#include "phonemgr-utils.h"
 #include "app.h"
 
 static char *bdaddr_ident = NULL;

Modified: trunk/src/phonemgr-chooser-button.c
==============================================================================
--- trunk/src/phonemgr-chooser-button.c	(original)
+++ trunk/src/phonemgr-chooser-button.c	Wed Feb  4 16:55:41 2009
@@ -63,7 +63,6 @@
 static void
 set_btdevname (PhonemgrChooserButton *button, const char *bdaddr)
 {
-	GtkWidget *w;
 	char *c;
 
 	if (bdaddr != NULL && bdaddr[0] != '\0') {
@@ -171,7 +170,6 @@
 phonemgr_chooser_button_class_init (PhonemgrChooserButtonClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
 	parent_class = g_type_class_peek_parent (klass);
 

Modified: trunk/src/phonemgr-object.h
==============================================================================
--- trunk/src/phonemgr-object.h	(original)
+++ trunk/src/phonemgr-object.h	Wed Feb  4 16:55:41 2009
@@ -55,6 +55,8 @@
 	guint num_batteries : 1;
 };
 
+GType phonemgr_object_get_type (void);
+
 void phonemgr_object_emit_number_batteries_changed (PhonemgrObject *o, guint num_batteries);
 void phonemgr_object_emit_battery_state_changed (PhonemgrObject *o, guint index, guint percentage, gboolean on_ac);
 void phonemgr_object_emit_network_registration_changed (PhonemgrObject *o, int mcc, int mnc, int lac, int cid);

Modified: trunk/src/ui.c
==============================================================================
--- trunk/src/ui.c	(original)
+++ trunk/src/ui.c	Wed Feb  4 16:55:41 2009
@@ -216,7 +216,7 @@
 populate_prefs (MyApp *app)
 {
 	GtkWidget *w;
-	char *c, *bdaddr;
+	char *c;
 	int ctype;
 	
 	ctype = gconf_client_get_int (app->client,



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