[patch] big cleanup.



Attached patch does a lot of simple but meaningful cleanup.

Namely,

        - Mark 55 non-static functions as static, as they are actually
        not
          used outside of file and need not be exported.
        - Remove two redundant declarations
        - Put get_autoip() in an autoip.h header and use it.
        - Remove one local variable shadowing an even-more-local
        variable.
        - Add two FIXME's

There are gcc warning flags to catch the non-static/static mixup in the
future.  Gcc can warn whenever a non-static function is defined before
being declared.  This warns you that either (a) the function needs to be
added to a header file, (b) the header file should be included in the
source file, or (c) the function can be removed.  Gcc can also warn you
if a static function is not used, in which case you know to delete it
(this one is nice).

The options are "-Wmissing-declarations", "-Wmissing-prototypes", and
"-Wunused-function".

Can I apply? / Please apply.

Best,

	Robert Love

 applet/applet-dbus-devices.c  |   26 +++++++++++++-------------
 applet/applet-dbus-info.c     |    4 +++-
 applet/applet-dbus-vpn.c      |    8 ++++----
 applet/applet.c               |   18 +++++++++---------
 applet/nm-device.h            |    2 --
 applet/other-network-dialog.c |    4 ++--
 applet/passphrase-dialog.c    |    8 ++++----
 NetworkManager.c              |    2 +-
 NetworkManagerDbus.c          |    8 ++++----
 NetworkManagerDbus.h          |    3 ---
 NetworkManagerDevice.c        |   25 ++++++++++++-------------
 NetworkManagerPolicy.c        |    2 +-
 NetworkManagerUtils.c         |    4 ++--
 autoip.c                      |    1 +
 autoip.h                      |    3 +++
 nm-netlink-monitor.c          |    2 +-
 vpn-manager/nm-dbus-vpn.c     |    5 ++---
 17 files changed, 59 insertions(+), 60 deletions(-)

Index: gnome/applet/applet-dbus-devices.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet-dbus-devices.c,v
retrieving revision 1.8
diff -u -u -r1.8 applet-dbus-devices.c
--- gnome/applet/applet-dbus-devices.c	10 Jun 2005 03:13:26 -0000	1.8
+++ gnome/applet/applet-dbus-devices.c	20 Jun 2005 21:41:50 -0000
@@ -44,7 +44,7 @@
  * Callback from nmwa_dbus_update_nm_state
  *
  */
-void nmwa_dbus_nm_state_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_nm_state_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
@@ -114,7 +114,7 @@
  * Callback from nmwa_dbus_update_wireless_enabled
  *
  */
-void nmwa_dbus_update_wireless_enabled_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_update_wireless_enabled_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
@@ -152,7 +152,7 @@
  * Get the wireless_enabled value from NetworkManager
  *
  */
-void nmwa_dbus_update_wireless_enabled (NMWirelessApplet *applet)
+static void nmwa_dbus_update_wireless_enabled (NMWirelessApplet *applet)
 {
 	DBusMessage *		message;
 	DBusPendingCall *	pcall = NULL;
@@ -227,7 +227,7 @@
 	char *			vendor;
 } HalInfoCBData;
 
-void free_hal_info_cb_data (HalInfoCBData *cb_data)
+static void free_hal_info_cb_data (HalInfoCBData *cb_data)
 {
 	if (cb_data)
 	{
@@ -497,7 +497,7 @@
  * Copy the dbus data model over to the gui data model
  *
  */
-void nmwa_copy_data_model (NMWirelessApplet *applet)
+static void nmwa_copy_data_model (NMWirelessApplet *applet)
 {
 	GSList		*elt;
 	NetworkDevice	*act_dev = NULL;
@@ -527,7 +527,7 @@
  * Schedule the driver notification routine to run in the main loop.
  *
  */
-void nmwa_dbus_schedule_driver_notification (NMWirelessApplet *applet, NetworkDevice *dev)
+static void nmwa_dbus_schedule_driver_notification (NMWirelessApplet *applet, NetworkDevice *dev)
 {
 	DriverNotifyCBData	*cb_data;
 
@@ -550,7 +550,7 @@
  * has any problems (no carrier detect, no wireless scanning, etc).
  *
  */
-void nmwa_dbus_check_drivers (NMWirelessApplet *applet)
+static void nmwa_dbus_check_drivers (NMWirelessApplet *applet)
 {
 	GSList	*elt;
 
@@ -593,7 +593,7 @@
 	NMWirelessApplet *	applet;
 } NetPropCBData;
 
-void free_net_prop_cb_data (NetPropCBData *data)
+static void free_net_prop_cb_data (NetPropCBData *data)
 {
 	if (data)
 	{
@@ -610,7 +610,7 @@
  * Callback for each network we called "getProperties" on in nmwa_dbus_device_properties_cb().
  *
  */
-void nmwa_dbus_net_properties_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_net_properties_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NetPropCBData *	cb_data = (NetPropCBData *) user_data;
@@ -756,7 +756,7 @@
  * Callback for each device we called "getProperties" on in nmwa_dbus_update_devices_cb().
  *
  */
-void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
@@ -891,7 +891,7 @@
  * nmwa_dbus_update_devices callback.
  *
  */
-void nmwa_dbus_update_devices_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_update_devices_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
@@ -1091,7 +1091,7 @@
 } StrengthCBData;
 
 
-void free_strength_cb_data (StrengthCBData *data)
+static void free_strength_cb_data (StrengthCBData *data)
 {
 	if (data)
 		g_free (data->dev_path);
@@ -1105,7 +1105,7 @@
  * nmwa_dbus_update_device_strength callback.
  *
  */
-void nmwa_dbus_update_device_strength_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_update_device_strength_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	StrengthCBData *	cb_data = user_data;
Index: gnome/applet/applet-dbus-info.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet-dbus-info.c,v
retrieving revision 1.7
diff -u -u -r1.7 applet-dbus-info.c
--- gnome/applet/applet-dbus-info.c	17 Jun 2005 00:36:08 -0000	1.7
+++ gnome/applet/applet-dbus-info.c	20 Jun 2005 21:41:50 -0000
@@ -43,7 +43,7 @@
  * Helper to validate network types NMI can deal with
  *
  */
-inline gboolean nmi_network_type_valid (NMNetworkType type)
+static inline gboolean nmi_network_type_valid (NMNetworkType type)
 {
 	return ((type == NETWORK_TYPE_ALLOWED));
 }
@@ -377,6 +377,7 @@
 	ap_addrs_value = gconf_client_get (applet->gconf_client, gconf_key, NULL);
 	g_free (gconf_key);
 
+	/* FIXME: key_type is always nonnegative as it is unsigned */
 	if (!essid || (timestamp < 0) || (key_type < 0))
 	{
 		if (!essid)
@@ -389,6 +390,7 @@
 			reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadNetworkData",
 							"NetworkManagerInfo::getNetworkProperties could not access timestamp for network '%s'", network);
 		}
+		/* FIXME: key_type is always nonnegative as it is unsigned */
 		else if (key_type < 0)
 		{
 			reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadNetworkData",
Index: gnome/applet/applet-dbus-vpn.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet-dbus-vpn.c,v
retrieving revision 1.4
diff -u -u -r1.4 applet-dbus-vpn.c
--- gnome/applet/applet-dbus-vpn.c	12 Jun 2005 14:35:58 -0000	1.4
+++ gnome/applet/applet-dbus-vpn.c	20 Jun 2005 21:41:50 -0000
@@ -44,7 +44,7 @@
  * Callback from nmwa_dbus_vpn_get_active_vpn_connection
  *
  */
-void nmwa_dbus_vpn_get_active_vpn_connection_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_vpn_get_active_vpn_connection_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
@@ -125,7 +125,7 @@
 	char *			name;
 } VpnPropsCBData;
 
-void free_vpn_props_cb_data (VpnPropsCBData *data)
+static void free_vpn_props_cb_data (VpnPropsCBData *data)
 {
 	if (data)
 	{
@@ -141,7 +141,7 @@
  * Callback for each VPN connection we called "getVPNConnectionProperties" on.
  *
  */
-void nmwa_dbus_vpn_properties_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_vpn_properties_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	VpnPropsCBData *	cb_data = user_data;
@@ -248,7 +248,7 @@
  * nmwa_dbus_vpn_update_vpn_connections callback.
  *
  */
-void nmwa_dbus_vpn_update_vpn_connections_cb (DBusPendingCall *pcall, void *user_data)
+static void nmwa_dbus_vpn_update_vpn_connections_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	NMWirelessApplet *	applet = (NMWirelessApplet *) user_data;
Index: gnome/applet/applet.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/applet.c,v
retrieving revision 1.14
diff -u -u -r1.14 applet.c
--- gnome/applet/applet.c	17 Jun 2005 10:59:56 -0000	1.14
+++ gnome/applet/applet.c	20 Jun 2005 21:41:50 -0000
@@ -404,7 +404,7 @@
  * notifications for from GConf.
  *
  */
-GSList *nmwa_driver_notify_get_ignored_list (NMWirelessApplet *applet)
+static GSList *nmwa_driver_notify_get_ignored_list (NMWirelessApplet *applet)
 {
 	char			*key;
 	GConfValue	*value;
@@ -435,7 +435,7 @@
  * ignore driver notifications for a particular device.
  *
  */
-gboolean nmwa_driver_notify_is_device_ignored (NMWirelessApplet *applet, NetworkDevice *dev)
+static gboolean nmwa_driver_notify_is_device_ignored (NMWirelessApplet *applet, NetworkDevice *dev)
 {
 	gboolean		found = FALSE;
 	GSList *		mac_list = NULL;
@@ -477,7 +477,7 @@
  * in GConf.  Stores user's pref for "Don't remind me".
  *
  */
-void nmwa_driver_notify_ignore_device (NMWirelessApplet *applet, NetworkDevice *dev)
+static void nmwa_driver_notify_ignore_device (NMWirelessApplet *applet, NetworkDevice *dev)
 {
 	gboolean		found = FALSE;
 	GSList *		new_mac_list = NULL;
@@ -519,13 +519,13 @@
 	g_slist_free (new_mac_list);
 }
 
-gboolean nmwa_driver_notify_dialog_delete_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
+static gboolean nmwa_driver_notify_dialog_delete_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
 {
 	gtk_widget_destroy (widget);
 	return FALSE;
 }
 
-gboolean nmwa_driver_notify_dialog_destroy_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
+static gboolean nmwa_driver_notify_dialog_destroy_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
 {
 	DriverNotifyCBData	*cb_data = (DriverNotifyCBData *)(user_data);
 	NetworkDevice		*dev;
@@ -545,7 +545,7 @@
 }
 
 
-gboolean nmwa_driver_notify_ok_cb (GtkButton *button, gpointer user_data)
+static gboolean nmwa_driver_notify_ok_cb (GtkButton *button, gpointer user_data)
 {
 	DriverNotifyCBData	*cb_data = (DriverNotifyCBData *)(user_data);
 	NetworkDevice		*dev;
@@ -962,7 +962,7 @@
  * pop up a warning or error dialog with certain text
  *
  */
-gboolean show_warning_dialog (char *mesg)
+static gboolean show_warning_dialog (char *mesg)
 {
 	GtkWidget	*	dialog;
 	guint32		timestamp;
@@ -1372,7 +1372,7 @@
  * nmwa_add_networks_helper
  *
  */
-void nmwa_add_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
+static void nmwa_add_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
 {
 	AddNetworksCB *	cb_data = (AddNetworksCB *)user_data;
 	NMNetworkMenuItem *	item;
@@ -1405,7 +1405,7 @@
  * nmwa_has_encrypted_networks_helper
  *
  */
-void nmwa_has_encrypted_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
+static void nmwa_has_encrypted_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
 {
 	gboolean * has_encrypted = user_data;
 
Index: gnome/applet/nm-device.h
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/nm-device.h,v
retrieving revision 1.4
diff -u -u -r1.4 nm-device.h
--- gnome/applet/nm-device.h	15 May 2005 00:58:26 -0000	1.4
+++ gnome/applet/nm-device.h	20 Jun 2005 21:41:50 -0000
@@ -70,8 +70,6 @@
 gint					network_device_get_strength				(NetworkDevice *dev);
 void					network_device_set_strength				(NetworkDevice *dev, gint strength);
 
-const char *			network_device_get_iface					(NetworkDevice *dev);
-
 const char *			network_device_get_hal_udi				(NetworkDevice *dev);
 void					network_device_set_hal_udi				(NetworkDevice *dev, const char *hal_udi);
 
Index: gnome/applet/other-network-dialog.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/other-network-dialog.c,v
retrieving revision 1.4
diff -u -u -r1.4 other-network-dialog.c
--- gnome/applet/other-network-dialog.c	14 May 2005 21:54:29 -0000	1.4
+++ gnome/applet/other-network-dialog.c	20 Jun 2005 21:41:50 -0000
@@ -133,7 +133,7 @@
  * key type.
  *
  */
-void nmwa_other_network_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
+static void nmwa_other_network_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
 {
 	GtkLabel		*entry_label;
 	int			 combo_choice;
@@ -168,7 +168,7 @@
  * widget's status.
  *
  */
-void nmwa_other_network_dialog_enc_check_toggled (GtkWidget *enc_check_button, gpointer user_data)
+static void nmwa_other_network_dialog_enc_check_toggled (GtkWidget *enc_check_button, gpointer user_data)
 {
 	GladeXML		*xml = (GladeXML *)user_data;
 	GtkComboBox	*combo;
Index: gnome/applet/passphrase-dialog.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/gnome/applet/passphrase-dialog.c,v
retrieving revision 1.4
diff -u -u -r1.4 passphrase-dialog.c
--- gnome/applet/passphrase-dialog.c	14 May 2005 21:54:29 -0000	1.4
+++ gnome/applet/passphrase-dialog.c	20 Jun 2005 21:41:50 -0000
@@ -100,7 +100,7 @@
  * clear the passphrase entry, and hide the dialog.
  *
  */
-void nmi_passphrase_dialog_clear (GtkWidget *dialog)
+static void nmi_passphrase_dialog_clear (GtkWidget *dialog)
 {
 	char *		data;
 	GtkWidget *	entry = NULL;
@@ -143,7 +143,7 @@
  * key type.
  *
  */
-void nmi_passphrase_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
+static void nmi_passphrase_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
 {
 	GtkWidget *	dialog = gtk_widget_get_toplevel (key_type_combo);
 
@@ -181,7 +181,7 @@
  * to NetworkManager.  Get rid of the dialog.
  *
  */
-void nmi_passphrase_dialog_ok_clicked (GtkWidget *ok_button, gpointer user_data)
+static void nmi_passphrase_dialog_ok_clicked (GtkWidget *ok_button, gpointer user_data)
 {
 	GtkWidget *		dialog = gtk_widget_get_toplevel (ok_button);
 	NMWirelessApplet *	applet = (NMWirelessApplet *)user_data;
@@ -261,7 +261,7 @@
  * and get rid of the dialog.
  *
  */
-void nmi_passphrase_dialog_cancel_clicked (GtkWidget *cancel_button, gpointer user_data)
+static void nmi_passphrase_dialog_cancel_clicked (GtkWidget *cancel_button, gpointer user_data)
 {
 	GtkWidget *		dialog = gtk_widget_get_toplevel (cancel_button);
 	NMWirelessApplet *	applet = (NMWirelessApplet *)user_data;
Index: src/NetworkManager.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManager.c,v
retrieving revision 1.78
diff -u -u -r1.78 NetworkManager.c
--- src/NetworkManager.c	20 Jun 2005 20:34:35 -0000	1.78
+++ src/NetworkManager.c	20 Jun 2005 21:41:50 -0000
@@ -544,7 +544,7 @@
  * or not.
  *
  */
-gboolean nm_poll_and_update_wireless_link_state (NMData *data)
+static gboolean nm_poll_and_update_wireless_link_state (NMData *data)
 {
 	GSList *		elt;
 	GSList *		copy = NULL;
Index: src/NetworkManagerDbus.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDbus.c,v
retrieving revision 1.82
diff -u -u -r1.82 NetworkManagerDbus.c
--- src/NetworkManagerDbus.c	17 Jun 2005 00:36:08 -0000	1.82
+++ src/NetworkManagerDbus.c	20 Jun 2005 21:41:50 -0000
@@ -711,7 +711,7 @@
 } GetOneNetworkCBData;
 
 
-void free_get_one_network_cb_data (GetOneNetworkCBData *data)
+static void free_get_one_network_cb_data (GetOneNetworkCBData *data)
 {
 	if (data)
 	{
@@ -731,7 +731,7 @@
 } GetNetworksCBData;
 
 
-void free_get_networks_cb_data (GetNetworksCBData *data)
+static void free_get_networks_cb_data (GetNetworksCBData *data)
 {
 	if (data)
 	{
@@ -748,7 +748,7 @@
  * Add a new NMAccessPoint to the allowed list with the correct properties
  *
  */
-void nm_dbus_get_network_data_cb (DBusPendingCall *pcall, void *user_data)
+static void nm_dbus_get_network_data_cb (DBusPendingCall *pcall, void *user_data)
 {
 	GetOneNetworkCBData *	cb_data = (GetOneNetworkCBData *)user_data;
 	DBusMessage *			reply;
@@ -856,7 +856,7 @@
  * Async callback from nm_dbus_get_networks
  *
  */
-void nm_dbus_get_networks_cb (DBusPendingCall *pcall, void *user_data)
+static void nm_dbus_get_networks_cb (DBusPendingCall *pcall, void *user_data)
 {
 	DBusMessage *		reply;
 	DBusMessageIter	iter, array_iter;
Index: src/NetworkManagerDbus.h
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDbus.h,v
retrieving revision 1.32
diff -u -u -r1.32 NetworkManagerDbus.h
--- src/NetworkManagerDbus.h	10 Jun 2005 03:13:27 -0000	1.32
+++ src/NetworkManagerDbus.h	20 Jun 2005 21:41:50 -0000
@@ -80,9 +80,6 @@
 
 void			nm_dbus_update_allowed_networks		(DBusConnection *connection, NMAccessPointList *list, NMData *data);
 
-DBusMessage *	nm_dbus_create_error_message			(DBusMessage *message, const char *exception_namespace,
-												const char *exception, const char *format, ...);
-
 NMDevice *	nm_dbus_get_device_from_object_path	(NMData *data, const char *path);
 
 NMState		nm_get_app_state_from_data			(NMData *data);
Index: src/NetworkManagerDevice.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerDevice.c,v
retrieving revision 1.141
diff -u -u -r1.141 NetworkManagerDevice.c
--- src/NetworkManagerDevice.c	19 Jun 2005 19:15:26 -0000	1.141
+++ src/NetworkManagerDevice.c	20 Jun 2005 21:41:50 -0000
@@ -27,6 +27,7 @@
 #include <signal.h>
 #include <string.h>
 
+#include "autoip.h"
 #include "NetworkManager.h"
 #include "NetworkManagerMain.h"
 #include "NetworkManagerDevice.h"
@@ -43,8 +44,6 @@
 #include "nm-activation-request.h"
 #include "nm-utils.h"
 
-extern gboolean get_autoip (NMDevice *dev, struct in_addr *out_ip);
-
 /* Local static prototypes */
 static gpointer nm_device_worker (gpointer user_data);
 static gboolean nm_device_wireless_scan (gpointer user_data);
@@ -575,7 +574,7 @@
  * to get a link, based on the # of frequencies it has to
  * scan.
  */
-gint nm_device_get_association_pause_value (NMDevice *dev)
+static gint nm_device_get_association_pause_value (NMDevice *dev)
 {
 	g_return_val_if_fail (dev != NULL, -1);
 	g_return_val_if_fail (nm_device_is_wireless (dev), -1);
@@ -1029,7 +1028,7 @@
  * For wireless devices, get the frequency we broadcast/receive on.
  *
  */
-double nm_device_get_frequency (NMDevice *dev)
+static double nm_device_get_frequency (NMDevice *dev)
 {
 	NMSock	*sk;
 	int		 err;
@@ -1068,7 +1067,7 @@
  * A frequency <= 0 means "auto".
  *
  */
-void nm_device_set_frequency (NMDevice *dev, const double freq)
+static void nm_device_set_frequency (NMDevice *dev, const double freq)
 {
 	NMSock	*sk;
 	int		 err;
@@ -1146,7 +1145,7 @@
  * Returned value is rate in KHz.
  *
  */
-int nm_device_get_bitrate (NMDevice *dev)
+static int nm_device_get_bitrate (NMDevice *dev)
 {
 	NMSock		*sk;
 	int			 err = -1;
@@ -1179,7 +1178,7 @@
  * Rate argument should be in Mbps (mega-bits per second), or 0 for automatic.
  *
  */
-void nm_device_set_bitrate (NMDevice *dev, const int Mbps)
+static void nm_device_set_bitrate (NMDevice *dev, const int Mbps)
 {
 	NMSock	*sk;
 	
@@ -1632,7 +1631,7 @@
 /* I really wish nm_v_wait_for_completion_or_timeout could translate these
  * to first class args instead of a all this void * arg stuff, so these
  * helpers could be nice and _tiny_. */
-gboolean nm_completion_device_is_up_test (int tries, nm_completion_args args)
+static gboolean nm_completion_device_is_up_test (int tries, nm_completion_args args)
 {
 	NMDevice *dev = args[0];
 	gboolean *err = args[1];
@@ -1683,7 +1682,7 @@
 	nm_device_set_up_down (dev, FALSE);
 }
 
-gboolean nm_completion_device_is_down_test (int tries, nm_completion_args args)
+static gboolean nm_completion_device_is_down_test (int tries, nm_completion_args args)
 {
 	NMDevice *dev = args[0];
 	gboolean *err = args[1];
@@ -1702,7 +1701,7 @@
 	return FALSE;
 }
 
-gboolean nm_device_bring_down_wait (NMDevice *dev, gboolean cancelable)
+static gboolean nm_device_bring_down_wait (NMDevice *dev, gboolean cancelable)
 {
 	gboolean err = FALSE;
 	nm_completion_args args;
@@ -1880,7 +1879,7 @@
  * Cancel activation on a device and clean up.
  *
  */
-gboolean nm_device_activation_handle_cancel (NMActRequest *req)
+static gboolean nm_device_activation_handle_cancel (NMActRequest *req)
 {
 	NMDevice *		dev;
 	NMData *			data;
@@ -1911,7 +1910,7 @@
  * Schedule the activation cancel handler
  *
  */
-void nm_device_schedule_activation_handle_cancel (NMActRequest *req)
+static void nm_device_schedule_activation_handle_cancel (NMActRequest *req)
 {
 	NMDevice *	dev;
 	NMData *		data;
@@ -3050,7 +3049,7 @@
  * Return whether or not the device is successfully activated.
  *
  */
-gboolean nm_device_is_activated (NMDevice *dev)
+static gboolean nm_device_is_activated (NMDevice *dev)
 {
 	NMActRequest *	req;
 	NMActStage	stage;
Index: src/NetworkManagerPolicy.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerPolicy.c,v
retrieving revision 1.56
diff -u -u -r1.56 NetworkManagerPolicy.c
--- src/NetworkManagerPolicy.c	16 May 2005 01:28:45 -0000	1.56
+++ src/NetworkManagerPolicy.c	20 Jun 2005 21:41:50 -0000
@@ -44,7 +44,7 @@
  * on the main thread.
  *
  */
-gboolean nm_policy_activation_finish (NMActRequest *req)
+static gboolean nm_policy_activation_finish (NMActRequest *req)
 {
 	NMDevice			*dev = NULL;
 	NMAccessPoint		*ap = NULL;
Index: src/NetworkManagerUtils.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/NetworkManagerUtils.c,v
retrieving revision 1.38
diff -u -u -r1.38 NetworkManagerUtils.c
--- src/NetworkManagerUtils.c	10 Jun 2005 03:47:47 -0000	1.38
+++ src/NetworkManagerUtils.c	20 Jun 2005 21:41:50 -0000
@@ -461,7 +461,7 @@
  * Blacklist certain wireless devices.
  *
  */
-NMDriverSupportLevel nm_get_wireless_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
+static NMDriverSupportLevel nm_get_wireless_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
 {
 	NMDriverSupportLevel	 level = NM_DRIVER_FULLY_SUPPORTED;
 	char					*driver_name = NULL;
@@ -500,7 +500,7 @@
  * Blacklist certain devices.
  *
  */
-NMDriverSupportLevel nm_get_wired_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
+static NMDriverSupportLevel nm_get_wired_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
 {
 	NMDriverSupportLevel	 level = NM_DRIVER_FULLY_SUPPORTED;
 	char					*driver_name = NULL;
Index: src/autoip.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/autoip.c,v
retrieving revision 1.9
diff -u -u -r1.9 autoip.c
--- src/autoip.c	3 May 2005 20:41:34 -0000	1.9
+++ src/autoip.c	20 Jun 2005 21:41:50 -0000
@@ -34,6 +34,7 @@
 #include "NetworkManagerMain.h"
 #include "NetworkManagerUtils.h"
 #include "nm-utils.h"
+#include "autoip.h"
 
 // Times here are in seconds
 #define LINKLOCAL_ADDR		0xa9fe0000
Index: src/autoip.h
===================================================================
RCS file: src/autoip.h
diff -N src/autoip.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/autoip.h	20 Jun 2005 21:41:50 -0000
@@ -0,0 +1,3 @@
+#include "NetworkManagerDevice.h"
+
+extern gboolean get_autoip (NMDevice *dev, struct in_addr *out_ip);
Index: src/nm-netlink-monitor.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/nm-netlink-monitor.c,v
retrieving revision 1.10
diff -u -u -r1.10 nm-netlink-monitor.c
--- src/nm-netlink-monitor.c	19 Jun 2005 04:09:20 -0000	1.10
+++ src/nm-netlink-monitor.c	20 Jun 2005 21:41:50 -0000
@@ -205,7 +205,7 @@
 	return TRUE;
 }
 
-void
+static void
 nm_netlink_monitor_close_connection (NmNetlinkMonitor  *monitor)
 {
 	g_return_if_fail (monitor->priv->io_channel != NULL);
Index: src/vpn-manager/nm-dbus-vpn.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/src/vpn-manager/nm-dbus-vpn.c,v
retrieving revision 1.5
diff -u -u -r1.5 nm-dbus-vpn.c
--- src/vpn-manager/nm-dbus-vpn.c	12 Jun 2005 14:35:59 -0000	1.5
+++ src/vpn-manager/nm-dbus-vpn.c	20 Jun 2005 21:41:50 -0000
@@ -321,7 +321,7 @@
 } UpdateOneVPNCBData;
 
 
-void free_update_one_vpn_cb_data (UpdateOneVPNCBData *data)
+static void free_update_one_vpn_cb_data (UpdateOneVPNCBData *data)
 {
 	if (data)
 		g_free (data->vpn);
@@ -334,7 +334,7 @@
  * Retrieve and add to our VPN Manager one VPN connection from NMI.
  *
  */
-void nm_dbus_vpn_update_one_connection_cb (DBusPendingCall *pcall, void *user_data)
+static void nm_dbus_vpn_update_one_connection_cb (DBusPendingCall *pcall, void *user_data)
 {
 	UpdateOneVPNCBData *	cb_data = (UpdateOneVPNCBData *) user_data;
 	DBusMessage *			reply;
@@ -601,7 +601,6 @@
 	DBusMessage		*reply = NULL;
 	DBusError			 error;
 	const char		*name;
-	const char		*user_name;
 	gboolean			 good = FALSE;
 	NMVPNConnection	*vpn_con;
 


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