diff options
author | Christopher Aillon <caillon@redhat.com> | 2005-09-11 02:32:30 +0000 |
---|---|---|
committer | Chris Aillon <caillon@redhat.com> | 2005-09-11 02:32:30 +0000 |
commit | 314e6fc42679927be1c799b1655b94b82fedddea (patch) | |
tree | 1d6c85acfb25272a0298514dd25c0d5f005cfc25 | |
parent | 96174e04a69805671fa7b52c53807196685e1c2b (diff) | |
download | NetworkManager-314e6fc42679927be1c799b1655b94b82fedddea.tar.gz |
2005-09-10 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet.c:
* gnome/applet/applet-dbus-devices.c:
* gnome/applet/applet-dbus-info.c:
* gnome/applet/passphrase-dialog.c:
* gnome/libnm_glib/libnm_glib.c:
* gnome/vpn-properties/nm-vpn-properties.c:
* src/autoip.c:
* src/backends/NetworkManagerRedHat.c:
* src/named-manager/nm-named-manager.c:
* src/NetworkManagerAPList.c:
* src/NetworkManager.c:
* src/NetworkManagerDbus.c:
* src/NetworkManagerDevice.c:
* src/NetworkManagerPolicy.c:
* src/NetworkManagerSystem.c:
* src/nm-dbus-device.c:
* src/nm-dbus-nm.c:
* src/vpn-manager/nm-vpn-manager.c:
* src/vpn-manager/nm-vpn-service.c:
* test/libnm_glib_test.c:
* test/nminfotest.c:
* test/nmtestdevices.c:
Fix up a bunch of 'unused variable' compiler warnings
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@959 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | gnome/applet/applet-dbus-devices.c | 22 | ||||
-rw-r--r-- | gnome/applet/applet-dbus-info.c | 8 | ||||
-rw-r--r-- | gnome/applet/applet.c | 19 | ||||
-rw-r--r-- | gnome/applet/passphrase-dialog.c | 1 | ||||
-rw-r--r-- | gnome/libnm_glib/libnm_glib.c | 2 | ||||
-rw-r--r-- | gnome/vpn-properties/nm-vpn-properties.c | 15 | ||||
-rw-r--r-- | src/NetworkManager.c | 6 | ||||
-rw-r--r-- | src/NetworkManagerAPList.c | 2 | ||||
-rw-r--r-- | src/NetworkManagerDbus.c | 1 | ||||
-rw-r--r-- | src/NetworkManagerDevice.c | 8 | ||||
-rw-r--r-- | src/NetworkManagerPolicy.c | 6 | ||||
-rw-r--r-- | src/NetworkManagerSystem.c | 2 | ||||
-rw-r--r-- | src/autoip.c | 1 | ||||
-rw-r--r-- | src/backends/NetworkManagerRedHat.c | 2 | ||||
-rw-r--r-- | src/named-manager/nm-named-manager.c | 3 | ||||
-rw-r--r-- | src/nm-dbus-device.c | 3 | ||||
-rw-r--r-- | src/nm-dbus-nm.c | 3 | ||||
-rw-r--r-- | src/vpn-manager/nm-vpn-manager.c | 1 | ||||
-rw-r--r-- | src/vpn-manager/nm-vpn-service.c | 11 | ||||
-rw-r--r-- | test/libnm_glib_test.c | 1 | ||||
-rw-r--r-- | test/nminfotest.c | 3 | ||||
-rw-r--r-- | test/nmtestdevices.c | 2 |
23 files changed, 51 insertions, 95 deletions
@@ -1,5 +1,29 @@ 2005-09-10 Christopher Aillon <caillon@redhat.com> + * gnome/applet/applet.c: + * gnome/applet/applet-dbus-devices.c: + * gnome/applet/applet-dbus-info.c: + * gnome/applet/passphrase-dialog.c: + * gnome/libnm_glib/libnm_glib.c: + * gnome/vpn-properties/nm-vpn-properties.c: + * src/autoip.c: + * src/backends/NetworkManagerRedHat.c: + * src/named-manager/nm-named-manager.c: + * src/NetworkManagerAPList.c: + * src/NetworkManager.c: + * src/NetworkManagerDbus.c: + * src/NetworkManagerDevice.c: + * src/NetworkManagerPolicy.c: + * src/NetworkManagerSystem.c: + * src/nm-dbus-device.c: + * src/nm-dbus-nm.c: + * src/vpn-manager/nm-vpn-manager.c: + * src/vpn-manager/nm-vpn-service.c: + * test/libnm_glib_test.c: + * test/nminfotest.c: + * test/nmtestdevices.c: + Fix a bunch of 'unused variable' compiler warnings + * NetworkManager.h: * gnome/applet/applet-dbus-info.c: * gnome/applet/applet-dbus-info.h: diff --git a/gnome/applet/applet-dbus-devices.c b/gnome/applet/applet-dbus-devices.c index d2643e0641..085f9edf50 100644 --- a/gnome/applet/applet-dbus-devices.c +++ b/gnome/applet/applet-dbus-devices.c @@ -868,24 +868,28 @@ out: void nmwa_dbus_dialup_activate_connection (NMWirelessApplet *applet, const char *name) { DBusMessage *message; - DBusMessageIter iter; - DBusMessageIter iter_array; g_return_if_fail (name != NULL); if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "activateDialup"))) { + nm_info ("Activating dialup connection '%s'.", name); #if 0 - dbus_message_iter_init_append (message, &iter); - dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &name); - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array); - - for (i = passwords; i != NULL; i = g_slist_next (i)) { - dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &(i->data)); + { + DBusMessageIter iter; + DBusMessageIter iter_array; + dbus_message_iter_init_append (message, &iter); + dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &name); + dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array); + + for (i = passwords; i != NULL; i = g_slist_next (i)) { + dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &(i->data)); + } + dbus_message_iter_close_container (&iter, &iter_array); } - dbus_message_iter_close_container (&iter, &iter_array); #endif + dbus_message_append_args (message, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID); if (!dbus_connection_send (applet->connection, message, NULL)) nm_warning ("nmwa_dbus_activate_dialup_connection(): Could not send activateDialup message!"); diff --git a/gnome/applet/applet-dbus-info.c b/gnome/applet/applet-dbus-info.c index ab0e9cff32..d488d3c7b1 100644 --- a/gnome/applet/applet-dbus-info.c +++ b/gnome/applet/applet-dbus-info.c @@ -194,8 +194,6 @@ static DBusMessage * nmi_dbus_get_key_for_network (NMWirelessApplet *applet, DBu void nmi_dbus_return_user_key (DBusConnection *connection, DBusMessage *message, const char *passphrase, const NMEncKeyType key_type) { DBusMessage * reply; - const char * dev_path; - const char * net_path; const int tmp_key_type = (int)key_type; g_return_if_fail (connection != NULL); @@ -659,7 +657,7 @@ static DBusMessage *nmi_dbus_get_vpn_connection_properties (NMWirelessApplet *ap } else { - DBusMessageIter iter, array_iter; + DBusMessageIter iter; reply = dbus_message_new_method_return (message); dbus_message_iter_init_append (reply, &iter); @@ -923,16 +921,12 @@ static void nmi_save_network_info (NMWirelessApplet *applet, const char *essid, */ static void nmi_dbus_update_network_info (NMWirelessApplet *applet, DBusMessage *message) { - DBusMessage * reply_message = NULL; char * network = NULL; NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN; char * enc_key_source = NULL; int enc_key_type = -1; - char * key; gboolean user_requested; - GConfValue * value; DBusError error; - char * escaped_network; dbus_bool_t args_good; g_return_if_fail (applet != NULL); diff --git a/gnome/applet/applet.c b/gnome/applet/applet.c index 20cb9c0f13..5942008874 100644 --- a/gnome/applet/applet.c +++ b/gnome/applet/applet.c @@ -210,7 +210,6 @@ static gboolean nmwa_update_info (NMWirelessApplet *applet) GtkWidget *label; struct ifreq ifr; int fd, flags; - gboolean ret_val = TRUE; const char *iface = NULL; NetworkDevice *dev; gboolean ret = TRUE; @@ -348,10 +347,6 @@ static void nmwa_show_info_cb (GtkMenuItem *mi, NMWirelessApplet *applet) static void nmwa_about_cb (NMWirelessApplet *applet) { - GdkPixbuf *pixbuf; - char *file; - GtkWidget *about_dialog; - static const gchar *authors[] = { "The Red Hat Desktop Team, including:\n", @@ -383,6 +378,10 @@ static void nmwa_about_cb (NMWirelessApplet *applet) }; #if !GTK_CHECK_VERSION(2,6,0) + GdkPixbuf *pixbuf; + char *file; + GtkWidget *about_dialog; + /* GTK 2.4 and earlier, have to use libgnome for about dialog */ file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-networktool.png", FALSE, NULL); pixbuf = gdk_pixbuf_new_from_file (file, NULL); @@ -802,7 +801,6 @@ gboolean nmwa_driver_notify (gpointer user_data) char * label_text = NULL; char * temp = NULL; GtkButton * button; - NMDriverSupportLevel support_level; guint32 timestamp; g_return_val_if_fail (cb_data != NULL, FALSE); @@ -1517,8 +1515,6 @@ static void nmwa_menu_add_text_item (GtkWidget *menu, char *text) */ static void nmwa_menu_add_device_item (GtkWidget *menu, NetworkDevice *device, gint n_devices, NMWirelessApplet *applet) { - GtkWidget * menu_item; - g_return_if_fail (menu != NULL); g_return_if_fail (device != NULL); g_return_if_fail (applet != NULL); @@ -1672,7 +1668,6 @@ static void nmwa_has_encrypted_networks_helper (NetworkDevice *dev, WirelessNetw */ static void nmwa_menu_device_add_networks (GtkWidget *menu, NetworkDevice *dev, NMWirelessApplet *applet) { - GSList * list; gboolean has_encrypted = FALSE; AddNetworksCB * add_networks_cb = NULL; @@ -1766,7 +1761,6 @@ static void nmwa_menu_add_dialup_menu (GtkWidget *menu, NMWirelessApplet *applet { GtkMenuItem *item; GtkMenu *dialup_menu; - GtkMenuItem *other_item; GSList *elt; g_return_if_fail (menu != NULL); @@ -1807,7 +1801,6 @@ static gboolean is_vpn_available (void) result = FALSE; if ((dir = g_dir_open (VPN_NAME_FILES_DIR, 0, NULL)) != NULL) { - const char *f; if (g_dir_read_name (dir) != NULL) result = TRUE; g_dir_close (dir); @@ -2053,7 +2046,6 @@ static GtkWidget *nmwa_dropdown_menu_create (GtkMenuItem *parent, NMWirelessAppl */ static void nmwa_context_menu_update (NMWirelessApplet *applet) { - GtkWidget *image; GSList *element; gboolean have_wireless = FALSE; @@ -2189,7 +2181,6 @@ static gboolean nmwa_toplevel_menu_button_press_cb (GtkWidget *widget, GdkEventB static void nmwa_setup_widgets (NMWirelessApplet *applet) { GtkWidget *menu_bar; - GtkWidget *event_box; /* Event box for tooltips */ applet->event_box = gtk_event_box_new (); @@ -2368,8 +2359,6 @@ static void nmwa_destroy (NMWirelessApplet *applet, gpointer user_data) */ static GtkWidget * nmwa_get_instance (NMWirelessApplet *applet) { - GError * error = NULL; - gtk_widget_hide (GTK_WIDGET (applet)); applet->nm_running = FALSE; diff --git a/gnome/applet/passphrase-dialog.c b/gnome/applet/passphrase-dialog.c index 12b28aa9d7..8f57e4f55e 100644 --- a/gnome/applet/passphrase-dialog.c +++ b/gnome/applet/passphrase-dialog.c @@ -373,7 +373,6 @@ GtkWidget *nmi_passphrase_dialog_init (NMWirelessApplet *applet) { GtkWidget * dialog; GtkButton * ok_button; - GtkButton * cancel_button; GtkEntry * entry; GtkComboBox * key_type_combo; GtkLabel * label; diff --git a/gnome/libnm_glib/libnm_glib.c b/gnome/libnm_glib/libnm_glib.c index e359dcc54e..fe6fb48e93 100644 --- a/gnome/libnm_glib/libnm_glib.c +++ b/gnome/libnm_glib/libnm_glib.c @@ -418,7 +418,6 @@ static libnm_glib_ctx *libnm_glib_ctx_new (void) if (!(ctx->callbacks_lock = g_mutex_new ())) goto error; -success: return ctx; error: @@ -459,7 +458,6 @@ libnm_glib_ctx *libnm_glib_init (void) while (!ctx->thread_inited) g_usleep (G_USEC_PER_SEC / 2); -success: return ctx; error: diff --git a/gnome/vpn-properties/nm-vpn-properties.c b/gnome/vpn-properties/nm-vpn-properties.c index c37b012020..4df939156d 100644 --- a/gnome/vpn-properties/nm-vpn-properties.c +++ b/gnome/vpn-properties/nm-vpn-properties.c @@ -119,7 +119,6 @@ out: static gboolean add_vpn_connection (const char *conn_name, const char *service_name, GSList *conn_data, GSList *routes) { - int i; char *gconf_key; GtkTreeIter iter; char conn_gconf_path[PATH_MAX]; @@ -232,7 +231,6 @@ static gboolean vpn_druid_vpn_type_page_next (GnomeDruidPage *druidpage, gpointer user_data) { GtkWidget *w; - GtkWidget *vbox; NetworkManagerVpnUI *vpn_ui; /*printf ("vpn_type_next!\n");*/ @@ -296,7 +294,6 @@ static gboolean vpn_druid_vpn_details_page_next (GnomeDruidPage *druidpage, is_valid = vpn_ui->is_valid (vpn_ui); } -out: return !is_valid; } @@ -325,7 +322,6 @@ static gboolean vpn_druid_vpn_confirm_page_finish (GnomeDruidPage *druidpage, GtkWidget *widget, gpointer user_data) { - static int vpncon = 0; GSList *conn_data; GSList *conn_routes; char *conn_name; @@ -341,7 +337,7 @@ static gboolean vpn_druid_vpn_confirm_page_finish (GnomeDruidPage *druidpage, add_vpn_connection (conn_name, vpn_ui->get_service_name (vpn_ui), conn_data, conn_routes); gtk_widget_hide_all (GTK_WIDGET (druid_window)); -out: + return FALSE; } @@ -786,9 +782,7 @@ export_cb (GtkButton *button, gpointer user_data) GSList *conn_vpn_data; GSList *conn_routes; const char *conn_name; - char key[PATH_MAX]; char *conn_gconf_path; - GtkTreeIter iter; /*printf ("edit\n");*/ @@ -815,7 +809,6 @@ static void get_all_vpn_connections (void) const char *conn_name; const char *conn_service_name; GSList *conn_vpn_data; - GSList *i; gboolean conn_user_can_edit = TRUE; conn_gconf_path = (const char *) (vpn_conn->data); @@ -865,9 +858,6 @@ static void get_all_vpn_connections (void) error: g_free (vpn_conn->data); } - -out: - ; } static void @@ -925,12 +915,9 @@ init_app (void) { GtkWidget *w; gchar *glade_file; - char *file; - GtkTreeIter iter; GtkTreeViewColumn *column; GtkCellRenderer *renderer; GSList *i; - NetworkManagerVpnUI *vpn_ui_interface; GtkHBox *vpn_type_hbox1; GDir *dir; diff --git a/src/NetworkManager.c b/src/NetworkManager.c index 03ffa31a64..3d80232865 100644 --- a/src/NetworkManager.c +++ b/src/NetworkManager.c @@ -500,7 +500,6 @@ static void sigterm_handler (int signum) static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer user_data) { NMData * data = user_data; - NMDevice * act_dev = NULL; nm_info ("Caught terminiation signal"); g_main_loop_quit (data->main_loop); @@ -606,8 +605,6 @@ static void nm_device_link_activated (NmNetlinkMonitor *monitor, const gchar *in { if (nm_device_is_wired (dev) && !nm_device_has_active_link (dev)) { - NMDevice *act_dev = NULL; - nm_device_set_link_active (dev, TRUE); nm_policy_schedule_device_change_check (data); } @@ -818,12 +815,9 @@ void nm_hal_deinit (NMData *data) */ int main( int argc, char *argv[] ) { - guint link_source_id; - GSource * link_source; gboolean become_daemon = TRUE; gboolean enable_test_devices = FALSE; GError * error = NULL; - DBusError dbus_error; char * owner; if ((int)getuid() != 0) diff --git a/src/NetworkManagerAPList.c b/src/NetworkManagerAPList.c index 2a8ee12e49..73fc7197a9 100644 --- a/src/NetworkManagerAPList.c +++ b/src/NetworkManagerAPList.c @@ -439,7 +439,6 @@ gboolean nm_ap_list_merge_scanned_ap (NMAccessPointList *list, NMAccessPoint *me gboolean *new, gboolean *strength_changed) { NMAccessPoint *list_ap_addr, *list_ap_essid; - gboolean success = FALSE; g_return_val_if_fail (list != NULL, FALSE); g_return_val_if_fail (merge_ap != NULL, FALSE); @@ -457,7 +456,6 @@ gboolean nm_ap_list_merge_scanned_ap (NMAccessPointList *list, NMAccessPoint *me * strength, and the time_last_seen. */ const GTimeVal *merge_ap_seen = nm_ap_get_last_seen (merge_ap); - const GTimeVal *list_ap_addr_seen = nm_ap_get_last_seen (list_ap_addr); nm_ap_set_encrypted (list_ap_addr, nm_ap_get_encrypted (merge_ap)); nm_ap_set_auth_method (list_ap_addr, nm_ap_get_auth_method (merge_ap)); diff --git a/src/NetworkManagerDbus.c b/src/NetworkManagerDbus.c index 154f727254..29a65ee72d 100644 --- a/src/NetworkManagerDbus.c +++ b/src/NetworkManagerDbus.c @@ -745,7 +745,6 @@ static void nm_dbus_get_network_data_cb (DBusPendingCall *pcall, void *user_data DBusError error; const char * essid = NULL; gint timestamp_secs = -1; - const char * key = NULL; NMEncKeyType key_type = -1; gboolean trusted = FALSE; NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN; diff --git a/src/NetworkManagerDevice.c b/src/NetworkManagerDevice.c index ec952dd918..339f6fb3db 100644 --- a/src/NetworkManagerDevice.c +++ b/src/NetworkManagerDevice.c @@ -1267,7 +1267,6 @@ void nm_device_get_ap_address (NMDevice *dev, struct ether_addr *addr) void nm_device_set_enc_key (NMDevice *dev, const char *key, NMDeviceAuthMethod auth_method) { NMSock *sk; - int err; struct iwreq wreq; int keylen; unsigned char safe_key[IW_ENCODING_TOKEN_MAX + 1]; @@ -1737,7 +1736,6 @@ NMNetworkMode nm_device_get_mode (NMDevice *dev) if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL))) { struct iwreq wrq; - int err; memset (&wrq, 0, sizeof (struct iwreq)); #ifdef IOCTL_DEBUG @@ -1788,7 +1786,6 @@ gboolean nm_device_set_mode (NMDevice *dev, const NMNetworkMode mode) if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL))) { struct iwreq wreq; - int err; gboolean mode_good = FALSE; switch (mode) @@ -2337,7 +2334,6 @@ static gboolean nm_device_wireless_wait_for_link (NMDevice *dev, const char *ess { guint assoc = 0; double last_freq = 0; - guint assoc_count = 0; struct timeval timeout = { .tv_sec = 0, .tv_usec = 0 }; nm_completion_args args; @@ -2618,7 +2614,6 @@ static gboolean nm_device_activate_stage3_ip_config_start (NMActRequest *req) NMData * data = NULL; NMDevice * dev = NULL; NMAccessPoint * ap = NULL; - NMIP4Config * ip4_config = NULL; g_return_val_if_fail (req != NULL, FALSE); @@ -2703,7 +2698,6 @@ static NMIP4Config *nm_device_new_ip4_autoip_config (NMDevice *dev) if (get_autoip (dev, &ip)) { #define LINKLOCAL_BCAST 0xa9feffff - int temp = ip.s_addr; config = nm_ip4_config_new (); @@ -2937,7 +2931,6 @@ static gboolean nm_device_activate_stage5_ip_config_commit (NMActRequest *req) { NMData * data = NULL; NMDevice * dev = NULL; - NMAccessPoint * ap = NULL; NMIP4Config * ip4_config = NULL; g_return_val_if_fail (req != NULL, FALSE); @@ -3713,7 +3706,6 @@ static gboolean nm_device_wireless_process_scan_results (gpointer user_data) NMWirelessScanResults *results = (NMWirelessScanResults *)user_data; NMDevice *dev; wireless_scan *tmp_ap; - gboolean have_blank_essids = FALSE; NMAPListIter *iter; GTimeVal cur_time; gboolean list_changed = FALSE; diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c index 17d149fe7e..0a8153d679 100644 --- a/src/NetworkManagerPolicy.c +++ b/src/NetworkManagerPolicy.c @@ -47,7 +47,6 @@ static gboolean nm_policy_activation_finish (NMActRequest *req) { NMDevice *dev = NULL; - NMAccessPoint *ap = NULL; NMData *data = NULL; g_return_val_if_fail (req != NULL, FALSE); @@ -85,7 +84,6 @@ static gboolean nm_policy_activation_finish (NMActRequest *req) nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_NOW_ACTIVE); nm_schedule_state_change_signal_broadcast (data); -out: return FALSE; } @@ -167,7 +165,6 @@ static gboolean nm_policy_activation_failed (NMActRequest *req) nm_schedule_state_change_signal_broadcast (data); nm_policy_schedule_device_change_check (data); -out: return FALSE; } @@ -551,7 +548,6 @@ static gboolean allowed_list_update_pending = FALSE; static gboolean nm_policy_allowed_ap_list_update (gpointer user_data) { NMData *data = (NMData *)user_data; - GSList *elt; allowed_list_update_pending = FALSE; @@ -622,8 +618,6 @@ static gboolean nm_policy_device_list_update_from_allowed_list (NMData *data) NMDevice *dev = (NMDevice *)(elt->data); if (nm_device_is_wireless (dev)) { - NMAccessPoint *best_ap; - if (nm_device_get_supports_wireless_scan (dev)) { /* Once we have the list, copy in any relevant information from our Allowed list and fill diff --git a/src/NetworkManagerSystem.c b/src/NetworkManagerSystem.c index cea909919d..604770bd73 100644 --- a/src/NetworkManagerSystem.c +++ b/src/NetworkManagerSystem.c @@ -186,7 +186,6 @@ gboolean nm_system_device_set_from_ip4_config (NMDevice *dev) { NMData * app_data; NMIP4Config * config; - gboolean success = FALSE; g_return_val_if_fail (dev != NULL, FALSE); @@ -298,7 +297,6 @@ out: */ gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config, char **routes, int num_routes) { - gboolean success = FALSE; NMIP4Config * ad_config = NULL; g_return_val_if_fail (iface != NULL, FALSE); diff --git a/src/autoip.c b/src/autoip.c index c842df404e..d9dc3e2454 100644 --- a/src/autoip.c +++ b/src/autoip.c @@ -214,7 +214,6 @@ gboolean get_autoip (NMDevice *dev, struct in_addr *out_ip) int nprobes = 0; int nannounce = 0; gboolean success = FALSE; - char *temp_addr; g_return_val_if_fail (dev != NULL, FALSE); g_return_val_if_fail (out_ip != NULL, FALSE); diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c index 8152c67376..801e89fdf7 100644 --- a/src/backends/NetworkManagerRedHat.c +++ b/src/backends/NetworkManagerRedHat.c @@ -329,7 +329,6 @@ void nm_system_restart_mdns_responder (void) void nm_system_device_add_ip6_link_address (NMDevice *dev) { char *buf; - char *addr; struct ether_addr hw_addr; unsigned char eui[8]; @@ -809,7 +808,6 @@ GSList * nm_system_get_dialup_config (void) while ((entry = g_dir_read_name(dir))) { NMDialUpConfig *config; - shvarFile *cfg_file; char *buf; if (!is_valid_cfg(entry)) diff --git a/src/named-manager/nm-named-manager.c b/src/named-manager/nm-named-manager.c index 393299006d..c47cf94bdb 100644 --- a/src/named-manager/nm-named-manager.c +++ b/src/named-manager/nm-named-manager.c @@ -258,7 +258,6 @@ nm_named_manager_error_quark (void) static void join_forwarders (gpointer key, gpointer value, gpointer data) { - guint id = GPOINTER_TO_UINT (key); const char *server = value; GString *str = data; @@ -604,7 +603,6 @@ compute_domain_searches (NMNamedManager *mgr) static void write_nameserver (gpointer key, gpointer value, gpointer data) { - guint id = GPOINTER_TO_UINT (key); const char *server = value; FILE *f = data; @@ -787,7 +785,6 @@ typedef struct { static void remove_domain_id (gpointer key, gpointer value, gpointer data) { - const char *domain = key; GHashTable *servers = value; NMNamedManagerRemoveData *removedata = data; diff --git a/src/nm-dbus-device.c b/src/nm-dbus-device.c index 4621764bc3..d81385f349 100644 --- a/src/nm-dbus-device.c +++ b/src/nm-dbus-device.c @@ -228,8 +228,7 @@ static DBusMessage *nm_dbus_device_get_networks (DBusConnection *connection, DBu gboolean success = FALSE; NMAccessPointList *ap_list; NMAPListIter *list_iter; - char *object_path, - *escaped_object_path; + char *escaped_object_path; dbus_message_iter_init_append (reply, &iter); dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH_AS_STRING, &iter_array); diff --git a/src/nm-dbus-nm.c b/src/nm-dbus-nm.c index 6a4751de01..7601b957d2 100644 --- a/src/nm-dbus-nm.c +++ b/src/nm-dbus-nm.c @@ -203,7 +203,6 @@ static DBusMessage *nm_dbus_nm_set_active_device (DBusConnection *connection, DB char * essid = NULL; char * key = NULL; int key_type = -1; - NMActRequest * req = NULL; NMAccessPoint * ap = NULL; g_return_val_if_fail (connection != NULL, NULL); @@ -463,7 +462,6 @@ static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, static DBusMessage *nm_dbus_nm_sleep (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) { - GSList *elt; NMData *app_data; g_return_val_if_fail (data && data->data && connection && message, NULL); @@ -499,7 +497,6 @@ static DBusMessage *nm_dbus_nm_sleep (DBusConnection *connection, DBusMessage *m static DBusMessage *nm_dbus_nm_wake (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data) { - GSList *elt; NMData *app_data; g_return_val_if_fail (data && data->data && connection && message, NULL); diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c index 7866c530bf..fa16de8eb1 100644 --- a/src/vpn-manager/nm-vpn-manager.c +++ b/src/vpn-manager/nm-vpn-manager.c @@ -310,7 +310,6 @@ gboolean nm_vpn_manager_process_signal (NMVPNManager *manager, DBusMessage *mess */ gboolean nm_vpn_manager_process_name_owner_changed (NMVPNManager *manager, const char *changed_service_name, const char *old_owner, const char *new_owner) { - NMVPNConnection * active; NMVPNService * service; gboolean handled = FALSE; diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c index 172b6a872d..3051727a50 100644 --- a/src/vpn-manager/nm-vpn-service.c +++ b/src/vpn-manager/nm-vpn-service.c @@ -31,6 +31,8 @@ #include "nm-vpn-act-request.h" #include "nm-utils.h" +/* define this for getting VPN debug messages */ +#undef NM_DEBUG_VPN_CONFIG struct NMVPNService { @@ -49,6 +51,7 @@ struct NMVPNService static void nm_vpn_service_add_watch (NMVPNService *service); static void nm_vpn_service_remove_watch (NMVPNService *service); static void nm_vpn_service_stop_connection_internal (NMVPNService *service); +#ifdef NM_DEBUG_VPN_CONFIG static void print_vpn_config (guint32 ip4_vpn_gateway, const char *tundev, guint32 ip4_internal_address, @@ -59,6 +62,7 @@ static void print_vpn_config (guint32 ip4_vpn_gateway, guint32 ip4_internal_nbns_len, const char *dns_domain, const char *login_banner); +#endif static void nm_vpn_service_schedule_stage1_daemon_exec (NMVPNService *service, NMVPNActRequest *req); static void nm_vpn_service_schedule_stage3_connect (NMVPNService *service, NMVPNActRequest *req); @@ -252,7 +256,6 @@ void nm_vpn_service_act_request_failed (NMVPNService *service, NMVPNActRequest * static void nm_vpn_service_activation_success (NMVPNService *service, NMVPNActRequest *req) { - GSource * source = NULL; NMVPNConnection * vpn = NULL; g_assert (service != NULL); @@ -479,7 +482,6 @@ static gboolean nm_vpn_service_stage3_connect (gpointer user_data) dbus_uint32_t password_count; char ** data_items; dbus_uint32_t data_count; - DBusError error; DBusMessage * message; DBusPendingCall * pcall = NULL; @@ -662,7 +664,7 @@ static void nm_vpn_service_stage4_ip_config_get (NMVPNService *service, NMVPNAct NMDevice * parent_dev; guint32 i; -#if 0 +#ifdef NM_DEBUG_VPN_CONFIG print_vpn_config (ip4_vpn_gateway, tundev, ip4_internal_address, ip4_internal_netmask, ip4_internal_dns, ip4_internal_dns_len, ip4_internal_nbns, ip4_internal_nbns_len, dns_domain, login_banner); @@ -897,7 +899,7 @@ gboolean nm_vpn_service_process_signal (NMVPNService *service, NMVPNActRequest * return TRUE; } - +#ifdef NM_DEBUG_VPN /* * Prints config returned from the service daemo */ @@ -948,3 +950,4 @@ static void print_vpn_config (guint32 ip4_vpn_gateway, nm_info ("-----------------------------------------"); } +#endif diff --git a/test/libnm_glib_test.c b/test/libnm_glib_test.c index 93ae67472a..248bb7d93a 100644 --- a/test/libnm_glib_test.c +++ b/test/libnm_glib_test.c @@ -61,7 +61,6 @@ int main( int argc, char *argv[] ) { GMainLoop *loop; libnm_glib_ctx *ctx; - guint id; ctx = libnm_glib_init (); if (!ctx) diff --git a/test/nminfotest.c b/test/nminfotest.c index f52a3dc726..cc77890a85 100644 --- a/test/nminfotest.c +++ b/test/nminfotest.c @@ -134,7 +134,6 @@ static void get_networks_of_type (DBusConnection *connection, NMNetworkType type { DBusMessage *message; DBusMessage *reply; - DBusMessageIter iter; DBusError error; gint32 type_as_int; char **networks; @@ -260,7 +259,6 @@ static DBusHandlerResult nm_message_handler (DBusConnection *connection, DBusMes { const char *method; const char *path; - DBusMessage *reply_message = NULL; gboolean handled = TRUE; g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED); @@ -283,7 +281,6 @@ static DBusHandlerResult nm_message_handler (DBusConnection *connection, DBusMes int main( int argc, char *argv[] ) { DBusConnection *connection; - DBusConnection *connection2; DBusError error; DBusObjectPathVTable vtable = { NULL, &nm_message_handler, NULL, NULL, NULL, NULL }; dbus_bool_t success = FALSE; diff --git a/test/nmtestdevices.c b/test/nmtestdevices.c index 93188ad039..9b656300d2 100644 --- a/test/nmtestdevices.c +++ b/test/nmtestdevices.c @@ -85,7 +85,6 @@ void remove_device (DBusConnection *connection, char *dev) { DBusMessage *message; DBusMessage *reply; - DBusMessageIter iter; DBusError error; g_return_if_fail (connection != NULL); @@ -125,7 +124,6 @@ void set_link_active (DBusConnection *connection, char *dev, gboolean active) { DBusMessage *message; DBusMessage *reply; - DBusMessageIter iter; DBusError error; g_return_if_fail (connection != NULL); |