> Now, the big Lebowsky.. "make"
> 
> make > make.log &
> 
> The process goes on for a minute or so then dies in mainwindow.c with  
> the following trainwreck of errors:
> 
> mainwindow.c: In function  
> 'mainwindow_locationset_list_is_separator_callback':
> mainwindow.c:506: error: parameter name omitted
> mainwindow.c: In function 'mainwindow_on_window_state_change':
> mainwindow.c:1391: error: parameter name omitted
> mainwindow.c: In function 'mainwindow_on_expose_event':
> mainwindow.c:1513: error: parameter name omitted
> mainwindow.c: In function 'mainwindow_on_gps_show_position_toggled':
> mainwindow.c:1534: error: parameter name omitted
[and more of the same...]

> Dropping back to gcc 3.3 doesn't solve the problem. Since nobody  
> building on Linux has reported this, my guess is (without looking  
> carefully at the code) that there that Apple's gcc4 doesn't like  
> what's being done here. Any suggestions about how to get around these  
> errors?

Each of those functions has a parameter called __unused.  On Linux, by
happenstance this name isn't being used by anything (even though it's
reserved).  On Darwin, in sys/cdefs.h it is defined to be a certain
GCC-specific construction and thus can't serve as the parameter name.

Try applying the attached patch.  It renames all the identifiers I could
find in live code starting with __.

-- 
Jeff
JID: [EMAIL PROTECTED]
=== modified file 'src/locationeditwindow.c'
--- src/locationeditwindow.c	
+++ src/locationeditwindow.c	
@@ -65,7 +65,7 @@
 static void locationeditwindow_set_title();
 //static void locationeditwindow_nameentry_insert_text(GtkEditable *pEditable, gchar *pszNewText, gint nNewTextLen, gint *pPosition, gpointer pUserData);
 static void locationeditwindow_configure_attribute_list();
-static void locationeditwindow_something_changed_callback(GtkEditable *_unused, gpointer __unused);
+static void locationeditwindow_something_changed_callback(GtkEditable *_unused, gpointer unused);
 
 void locationeditwindow_show_for_new(gint nDefaultLocationSetID);
 void locationeditwindow_show_for_edit(gint nLocationID);
@@ -277,14 +277,14 @@
 
 // Widget Callbacks
 
-static void locationeditwindow_something_changed_callback(GtkEditable *_unused, gpointer __unused)
+static void locationeditwindow_something_changed_callback(GtkEditable *_unused, gpointer unused)
 {
 	// NOTE: This callback is shared by several widgets
 	g_LocationEditWindow.bModified = TRUE;
 	locationeditwindow_set_title();
 }
 
-void locationeditwindow_on_attributeexpander_activate(GtkExpander *_unused, gpointer __unused)
+void locationeditwindow_on_attributeexpander_activate(GtkExpander *_unused, gpointer unused)
 {
 	// HACK: doesn't work when called directly (gets wrong value from expander?) so call it later
 	g_idle_add(locationeditwindow_set_expander_label, NULL);

=== modified file 'src/mainwindow.c'
--- src/mainwindow.c	
+++ src/mainwindow.c	
@@ -503,7 +503,7 @@
 	mapinfowindow_update(g_MainWindow.pMap);
 }
 
-gboolean mainwindow_locationset_list_is_separator_callback(GtkTreeModel *_unused, GtkTreeIter *pIter, gpointer __unused)
+gboolean mainwindow_locationset_list_is_separator_callback(GtkTreeModel *_unused, GtkTreeIter *pIter, gpointer unused)
 {
 	gint nLocationSetID;
 	gtk_tree_model_get(GTK_TREE_MODEL(g_MainWindow.pLocationSetsListStore), pIter, LOCATIONSETLIST_COLUMN_ID, &nLocationSetID, -1);
@@ -1388,7 +1388,7 @@
 	return FALSE; 	// propagate further
 }
 
-static gboolean mainwindow_on_window_state_change(GtkWidget *_unused, GdkEventKey *pEvent, gpointer __unused)
+static gboolean mainwindow_on_window_state_change(GtkWidget *_unused, GdkEventKey *pEvent, gpointer unused)
 {
 	// Set the menu's check without calling the signal handler
 	g_signal_handlers_block_by_func(g_MainWindow.pViewFullscreenMenuItem, mainwindow_on_fullscreenmenuitem_activate, NULL);
@@ -1510,7 +1510,7 @@
 	return TRUE;
 }
 
-static gboolean mainwindow_on_expose_event(GtkWidget *_unused, GdkEventExpose *pEvent, gpointer __unused)
+static gboolean mainwindow_on_expose_event(GtkWidget *_unused, GdkEventExpose *pEvent, gpointer unused)
 {
     if(pEvent->count > 0) return FALSE;
 
@@ -1531,7 +1531,7 @@
 /*
 ** GPS Functions
 */
-void mainwindow_on_gps_show_position_toggled(GtkWidget* _unused, gpointer* __unused)
+void mainwindow_on_gps_show_position_toggled(GtkWidget* _unused, gpointer* unused)
 {
 	gboolean bShowPosition = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(g_MainWindow.GPS.pShowPositionCheckButton));
 	gtk_widget_set_sensitive(GTK_WIDGET(g_MainWindow.GPS.pKeepPositionCenteredCheckButton), bShowPosition == TRUE);
@@ -1539,22 +1539,22 @@
 	gtk_widget_set_sensitive(GTK_WIDGET(g_MainWindow.GPS.pStickToRoadsCheckButton), FALSE);	// XXX: for now.
 }
 
-void mainwindow_on_gps_keep_position_centered_toggled(GtkWidget* _unused, gpointer* __unused)
-{
-
-}
-
-void mainwindow_on_gps_show_trail_toggled(GtkWidget* _unused, gpointer* __unused)
-{
-
-}
-
-void mainwindow_on_gps_stick_to_roads_toggled(GtkWidget* _unused, gpointer* __unused)
-{
-
-}
-
-static gboolean mainwindow_on_gps_redraw_timeout(gpointer __unused)
+void mainwindow_on_gps_keep_position_centered_toggled(GtkWidget* _unused, gpointer* unused)
+{
+
+}
+
+void mainwindow_on_gps_show_trail_toggled(GtkWidget* _unused, gpointer* unused)
+{
+
+}
+
+void mainwindow_on_gps_stick_to_roads_toggled(GtkWidget* _unused, gpointer* unused)
+{
+
+}
+
+static gboolean mainwindow_on_gps_redraw_timeout(gpointer unused)
 {
 	// NOTE: we're setting tooltips on the image's
 	GtkWidget* pWidget = gtk_widget_get_parent(GTK_WIDGET(g_MainWindow.pStatusbarGPSIcon));
@@ -1766,14 +1766,14 @@
 	mainwindow_draw_map(DRAWFLAG_ALL);
 }
 
-void mainwindow_on_backbutton_clicked(GtkWidget* _unused, gpointer* __unused)
+void mainwindow_on_backbutton_clicked(GtkWidget* _unused, gpointer* unused)
 {
 	map_history_go_back(g_MainWindow.pMapHistory);
 	mainwindow_go_to_current_history_item();
 	mainwindow_update_forward_back_buttons();
 }
 
-void mainwindow_on_forwardbutton_clicked(GtkWidget* _unused, gpointer* __unused)
+void mainwindow_on_forwardbutton_clicked(GtkWidget* _unused, gpointer* unused)
 {
 	map_history_go_forward(g_MainWindow.pMapHistory);
 	mainwindow_go_to_current_history_item();
@@ -1831,7 +1831,7 @@
 }
 
 
-void mainwindow_on_addpointmenuitem_activate(GtkWidget *_unused, gpointer* __unused)
+void mainwindow_on_addpointmenuitem_activate(GtkWidget *_unused, gpointer* unused)
 {
 	mappoint_t point;
 	map_windowpoint_to_mappoint(g_MainWindow.pMap, &g_MainWindow.ptClickLocation, &point);

=== modified file 'src/mapinfowindow.c'
--- src/mapinfowindow.c	
+++ src/mapinfowindow.c	
@@ -68,9 +68,9 @@
 static void mapinfowindow_on_state_chosen(GtkMenuItem* pMenuItem, gint nStateID);
 static void mapinfowindow_on_city_chosen(GtkMenuItem* pMenuItem, gint nCityID);
 
-static void mapinfowindow_on_state_button_clicked(GtkWidget* _unused, gpointer __unused);
-static void mapinfowindow_on_city_button_clicked(GtkWidget* _unused, gpointer __unused);
-static void mapinfowindow_on_country_button_clicked(GtkWidget* _unused, gpointer __unused);
+static void mapinfowindow_on_state_button_clicked(GtkWidget* _unused, gpointer unused);
+static void mapinfowindow_on_city_button_clicked(GtkWidget* _unused, gpointer unused);
+static void mapinfowindow_on_country_button_clicked(GtkWidget* _unused, gpointer unused);
 
 static void mapinfowindow_load_countries();
 static void mapinfowindow_load_cities(gint nStateID);
@@ -281,7 +281,7 @@
 	util_gtk_widget_set_visible(GTK_WIDGET(g_MapInfoWindow.pCityButton), FALSE);
 }
 
-static void mapinfowindow_on_country_button_clicked(GtkWidget* _unused, gpointer __unused)
+static void mapinfowindow_on_country_button_clicked(GtkWidget* _unused, gpointer unused)
 {
 	// re-zoom to the current country
 	mapinfowindow_select_country(g_MapInfoWindow.nCurrentCountryID, gtk_label_get_label(g_MapInfoWindow.pCountryLabel));
@@ -316,7 +316,7 @@
 	}
 }
 
-static void mapinfowindow_on_state_button_clicked(GtkWidget* _unused, gpointer __unused)
+static void mapinfowindow_on_state_button_clicked(GtkWidget* _unused, gpointer unused)
 {
 	// Just re-set selected state
 	mapinfowindow_select_state(g_MapInfoWindow.nCurrentStateID, gtk_label_get_label(g_MapInfoWindow.pStateLabel));
@@ -332,7 +332,7 @@
 //
 // City
 //
-static void mapinfowindow_on_city_button_clicked(GtkWidget* _unused, gpointer __unused)
+static void mapinfowindow_on_city_button_clicked(GtkWidget* _unused, gpointer unused)
 {
 	if(g_MapInfoWindow.nCurrentCityID != 0) {
 		g_debug("recentering on cityID %d", g_MapInfoWindow.nCurrentCityID);

=== modified file 'src/scenemanager.c'
--- src/scenemanager.c	
+++ src/scenemanager.c	
@@ -50,7 +50,7 @@
 	pSceneManager->nWindowHeight = nWindowHeight;
 }
 
-gboolean scenemanager_can_draw_label_at(scenemanager_t* pSceneManager, const gchar* pszLabel, GdkPoint* __unused_pScreenLocation, gint nFlags)
+gboolean scenemanager_can_draw_label_at(scenemanager_t* pSceneManager, const gchar* pszLabel, GdkPoint* unused_pScreenLocation, gint nFlags)
 {
 #ifdef ENABLE_NO_DUPLICATE_LABELS
 	g_assert(pSceneManager != NULL);

=== modified file 'src/tooltipwindow.c'
--- src/tooltipwindow.c	
+++ src/tooltipwindow.c	
@@ -86,7 +86,7 @@
 	gtk_widget_hide(GTK_WIDGET(pTooltip->pWindow));
 }
 
-static gboolean tooltip_on_mouse_motion(GtkWidget* pWidget, GdkEventMotion *__unused)
+static gboolean tooltip_on_mouse_motion(GtkWidget* pWidget, GdkEventMotion *unused)
 {
 	// in case the mouse makes its way onto the tooltip, hide it.
 	gtk_widget_hide(pWidget);

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
roadster mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/roadster

Reply via email to