[evolution-patches] *Update* Patch fix #310198 for Evolution and Evolution-data-server



Dear all,

I am sorry that the former mail contains just one patch. Here are they.
please ignore the former mail.

When I build evolution trunk on Sun Solaris, I found there were several code
failed while comiling with Sun's compiler 'Vulcan / Forte'.

I have checked these code, and most of them are grammar errors, for example, a
void function returns a value, some variable have the name 'inline' which
conflicts with the inline keyword, some empty struct declarations. It seems that
Sun's compiler is stricter than Gcc so these codes failed.

Attachment is my patch against these code. It is about evolution as well as
evolution-data-server.

They are also available on the following URL:
http://bugzilla.gnome.org/show_bug.cgi?id=310198

Could someone help me to review them ?

Thanks a lot.

Yours,
Mengjie 

Index: addressbook/libebook/e-book.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book.c,v
retrieving revision 1.53
diff -u -p -r1.53 e-book.c
--- addressbook/libebook/e-book.c	22 Jun 2005 12:34:22 -0000	1.53
+++ addressbook/libebook/e-book.c	13 Jul 2005 08:47:28 -0000
@@ -33,13 +33,13 @@ static GObjectClass *parent_class;
 		"file %s: line %d (%s): assertion `%s' failed",		\
 		__FILE__,						\
 		__LINE__,						\
-		__PRETTY_FUNCTION__,					\
+		G_STRFUNC,						\
 		#expr);							\
 	 g_set_error (error, E_BOOK_ERROR, (error_code),                \
 		"file %s: line %d (%s): assertion `%s' failed",		\
 		__FILE__,						\
 		__LINE__,						\
-		__PRETTY_FUNCTION__,					\
+		G_STRFUNC,						\
 		#expr);							\
 	 return FALSE;							\
        };				}G_STMT_END
Index: calendar/backends/file/e-cal-backend-file-events.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file-events.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 e-cal-backend-file-events.c
--- calendar/backends/file/e-cal-backend-file-events.c	3 Nov 2003 18:24:02 -0000	1.1.1.1
+++ calendar/backends/file/e-cal-backend-file-events.c	13 Jul 2005 08:47:29 -0000
@@ -30,6 +30,7 @@
 
 /* Private part of the CalBackendFileEvents structure */
 struct _ECalBackendFileEventsPrivate {
+	guint reserved;
 };
 
 
Index: calendar/backends/file/e-cal-backend-file-journal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file-journal.c,v
retrieving revision 1.1
diff -u -p -r1.1 e-cal-backend-file-journal.c
--- calendar/backends/file/e-cal-backend-file-journal.c	18 May 2005 07:29:01 -0000	1.1
+++ calendar/backends/file/e-cal-backend-file-journal.c	13 Jul 2005 08:47:29 -0000
@@ -21,6 +21,7 @@
 #include "e-cal-backend-file-journal.h"
 
 struct _ECalBackendFileJournalPrivate {
+	guint reserved;
 };
 
 static void e_cal_backend_file_journal_class_init (ECalBackendFileJournalClass *class);
Index: calendar/backends/file/e-cal-backend-file-todos.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/file/e-cal-backend-file-todos.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 e-cal-backend-file-todos.c
--- calendar/backends/file/e-cal-backend-file-todos.c	3 Nov 2003 18:24:02 -0000	1.1.1.1
+++ calendar/backends/file/e-cal-backend-file-todos.c	13 Jul 2005 08:47:29 -0000
@@ -26,6 +26,7 @@
 
 /* Private part of the ECalBackendFileTodos structure */
 struct _ECalBackendFileTodosPrivate {
+	guint reserved;
 };
 
 
Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/groupwise/e-cal-backend-groupwise-utils.c,v
retrieving revision 1.56
diff -u -p -r1.56 e-cal-backend-groupwise-utils.c
--- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	8 Jul 2005 11:04:19 -0000	1.56
+++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c	13 Jul 2005 08:47:31 -0000
@@ -1083,7 +1083,7 @@ e_gw_item_to_cal_component (EGwItem *ite
 			alarm = e_cal_component_alarm_new ();
 			e_cal_component_alarm_set_action (alarm, E_CAL_COMPONENT_ALARM_DISPLAY);
 			trigger.type = E_CAL_COMPONENT_ALARM_TRIGGER_RELATIVE_START;
-			trigger.u.rel_duration = (struct icaldurationtype) icaldurationtype_from_int (alarm_duration);
+			trigger.u.rel_duration = icaldurationtype_from_int (alarm_duration);
 			e_cal_component_alarm_set_trigger (alarm, trigger);
 			e_cal_component_add_alarm (comp, alarm);
 		}
Index: calendar/backends/weather/e-weather-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/backends/weather/e-weather-source.c,v
retrieving revision 1.1
diff -u -p -r1.1 e-weather-source.c
--- calendar/backends/weather/e-weather-source.c	7 Jan 2005 11:32:00 -0000	1.1
+++ calendar/backends/weather/e-weather-source.c	13 Jul 2005 08:47:32 -0000
@@ -27,7 +27,7 @@ e_weather_source_parse (EWeatherSource *
 	EWeatherSourceClass *class;
 	g_return_if_fail (source != NULL);
 	class = (EWeatherSourceClass*) G_OBJECT_GET_CLASS (source);
-	return class->parse (source, done, data);
+	class->parse (source, done, data);
 }
 
 static void
Index: calendar/libecal/e-cal.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/calendar/libecal/e-cal.c,v
retrieving revision 1.108
diff -u -p -r1.108 e-cal.c
--- calendar/libecal/e-cal.c	11 Jul 2005 02:19:28 -0000	1.108
+++ calendar/libecal/e-cal.c	13 Jul 2005 08:47:37 -0000
@@ -141,13 +141,13 @@ static GObjectClass *parent_class;
 		"file %s: line %d (%s): assertion `%s' failed",		\
 		__FILE__,						\
 		__LINE__,						\
-		__PRETTY_FUNCTION__,					\
+		G_STRFUNC,						\
 		#expr);							\
 	 g_set_error (error, E_CALENDAR_ERROR, (error_code),                \
 		"file %s: line %d (%s): assertion `%s' failed",		\
 		__FILE__,						\
 		__LINE__,						\
-		__PRETTY_FUNCTION__,					\
+		G_STRFUNC,						\
 		#expr);							\
 	 return FALSE;							\
        };				}G_STMT_END
Index: camel/camel-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/camel-store.c,v
retrieving revision 1.164
diff -u -p -r1.164 camel-store.c
--- camel/camel-store.c	10 Jul 2005 10:10:15 -0000	1.164
+++ camel/camel-store.c	13 Jul 2005 08:47:41 -0000
@@ -1288,8 +1288,10 @@ void camel_isubscribe_subscribe(CamelSto
 {
 	CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type());
 
-	if (iface && iface->subscribe)
-		return iface->subscribe(store, folder_name, ex);
+	if (iface && iface->subscribe) {
+		iface->subscribe(store, folder_name, ex);
+		return;
+	}
 
 	g_warning("Trying to invoke unimplemented subscribe method on a store");
 }
@@ -1298,8 +1300,10 @@ void camel_isubscribe_unsubscribe(CamelS
 {
 	CamelISubscribe *iface = camel_object_get_interface(store, camel_isubscribe_get_type());
 
-	if (iface && iface->unsubscribe)
-		return iface->unsubscribe(store, folder_name, ex);
+	if (iface && iface->unsubscribe) {
+		iface->unsubscribe(store, folder_name, ex);
+		return;
+	}
 
 	g_warning("Trying to invoke unimplemented unsubscribe method on a store");
 }
Index: calendar/gui/e-cal-model-calendar.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model-calendar.c,v
retrieving revision 1.19
diff -u -p -r1.19 e-cal-model-calendar.c
--- calendar/gui/e-cal-model-calendar.c	22 Jun 2005 08:16:26 -0000	1.19
+++ calendar/gui/e-cal-model-calendar.c	13 Jul 2005 08:58:48 -0000
@@ -32,6 +32,7 @@
 #include "dialogs/send-comp.h"
 
 struct _ECalModelCalendarPrivate {
+	guint reserved;
 };
 
 static void e_cal_model_calendar_finalize (GObject *object);
Index: calendar/gui/e-cal-model-tasks.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-cal-model-tasks.c,v
retrieving revision 1.30
diff -u -p -r1.30 e-cal-model-tasks.c
--- calendar/gui/e-cal-model-tasks.c	12 May 2005 09:36:20 -0000	1.30
+++ calendar/gui/e-cal-model-tasks.c	13 Jul 2005 08:58:52 -0000
@@ -32,6 +32,7 @@
 #include "misc.h"
 
 struct _ECalModelTasksPrivate {
+	guint reserved;
 };
 
 static void e_cal_model_tasks_finalize (GObject *object);
Index: calendar/gui/dialogs/comp-editor.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/dialogs/comp-editor.c,v
retrieving revision 1.140
diff -u -p -r1.140 comp-editor.c
--- calendar/gui/dialogs/comp-editor.c	11 Jul 2005 08:59:38 -0000	1.140
+++ calendar/gui/dialogs/comp-editor.c	13 Jul 2005 08:59:06 -0000
@@ -2023,13 +2023,13 @@ set_attachment_list (CompEditor *editor,
 		/* return if it's not a regular file */
 		if (!S_ISREG (statbuf.st_mode)) {
 			g_warning ("Cannot attach file %s: not a regular file", file_name);
-			return NULL;
+			return;
 		}
 		
 		stream = camel_stream_fs_new_with_name (file_name, O_RDONLY, 0);
 		if (!stream) {
 			g_warning ("Cannot attach file %s: %s", file_name, g_strerror (errno));
-			return NULL;
+			return;
 		}
 
 		mime_type = attachment_guess_mime_type (file_name);
Index: composer/e-msg-composer-select-file.h
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer-select-file.h,v
retrieving revision 1.7
diff -u -p -r1.7 e-msg-composer-select-file.h
--- composer/e-msg-composer-select-file.h	10 Feb 2005 04:34:29 -0000	1.7
+++ composer/e-msg-composer-select-file.h	13 Jul 2005 08:59:07 -0000
@@ -28,7 +28,7 @@
 struct _EMsgComposer;
 
 typedef void (*EMsgComposerSelectFileFunc)(struct _EMsgComposer *composer, const char *filename);
-typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int inline);
+typedef void (*EMsgComposerSelectAttachFunc)(struct _EMsgComposer *composer, GSList *names, int isinline);
 
 void e_msg_composer_select_file(struct _EMsgComposer *composer, GtkWidget **w, EMsgComposerSelectFileFunc func, const char *title, int save);
 void e_msg_composer_select_file_attachments(struct _EMsgComposer *composer, GtkWidget **, EMsgComposerSelectAttachFunc func);
Index: plugins/calendar-weather/calendar-weather.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/calendar-weather/calendar-weather.c,v
retrieving revision 1.6
diff -u -p -r1.6 calendar-weather.c
--- plugins/calendar-weather/calendar-weather.c	25 Jan 2005 12:28:23 -0000	1.6
+++ plugins/calendar-weather/calendar-weather.c	13 Jul 2005 08:59:22 -0000
@@ -107,7 +107,6 @@ e_calendar_weather_migrate (EPlugin *epl
 		g_object_unref (weather);
 
 	e_source_list_sync (source_list, NULL);
-	return 0;
 }
 
 static void


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