[evolution-patches] Build fix for gcc3.4
- From: David Malcolm <dmalcolm redhat com>
- To: Evolution Patches <evolution-patches ximian com>
- Subject: [evolution-patches] Build fix for gcc3.4
- Date: Thu, 22 Apr 2004 17:14:12 -0400
I had to apply the attached patch to get Evo HEAD to build with gcc3.4
gcc complains about trailing "default:" labels without statements in
switch statements; I believe this was a warning in gcc3.3 but is now an
error in gcc3.4 (the message you get is "error: label at end of
compound statement").
Removing the default statement altogether causes a flood of warnings
about all the unhandled values; adding a simple "break" after the
default seems to keep the various versions of gcc happy, YMMV
Dave Malcolm
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1665
diff -u -p -r1.1665 ChangeLog
--- addressbook/ChangeLog 22 Apr 2004 02:21:42 -0000 1.1665
+++ addressbook/ChangeLog 22 Apr 2004 20:50:41 -0000
@@ -1,3 +1,11 @@
+2004-04-22 David Malcolm <dmalcolm redhat com>
+
+ * conduit/address-conduit.c (addrconduit_save_configuration): Add
+ 'break' to empty 'default' to fix build on gcc 3.4
+ (get_next_home): Ditto.
+ (get_next_work): Ditto.
+ (get_next_fax): Ditto.
+
2004-04-21 Hans Petter Jansson <hpj ximian com>
* gui/contact-editor/e-contact-editor.c (free_attr_list): Implement.
Index: addressbook/conduit/address-conduit.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/conduit/address-conduit.c,v
retrieving revision 1.78
diff -u -p -r1.78 address-conduit.c
--- addressbook/conduit/address-conduit.c 7 Nov 2003 05:51:30 -0000 1.78
+++ addressbook/conduit/address-conduit.c 22 Apr 2004 20:50:47 -0000
@@ -494,7 +494,7 @@ get_next_mail (EContactField *field)
return E_CONTACT_EMAIL_2;
case E_CONTACT_EMAIL_2:
return E_CONTACT_EMAIL_3;
- default:
+ default: break;
}
return E_CONTACT_FIELD_LAST;
@@ -509,7 +509,7 @@ get_next_home (EContactField *field)
switch (*field) {
case E_CONTACT_PHONE_HOME:
return E_CONTACT_PHONE_HOME_2;
- default:
+ default: break;
}
return E_CONTACT_FIELD_LAST;
@@ -524,7 +524,7 @@ get_next_work (EContactField *field)
switch (*field) {
case E_CONTACT_PHONE_BUSINESS:
return E_CONTACT_PHONE_BUSINESS_2;
- default:
+ default: break;
}
return E_CONTACT_FIELD_LAST;
@@ -541,7 +541,7 @@ get_next_fax (EContactField *field)
return E_CONTACT_PHONE_HOME_FAX;
case E_CONTACT_PHONE_HOME_FAX:
return E_CONTACT_PHONE_OTHER_FAX;
- default:
+ default: break;
}
return E_CONTACT_FIELD_LAST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]