From 084196ff436eaa3c2ca8067170e70715ba890a24 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 29 Nov 2007 14:51:01 +0000 Subject: [PATCH] Warning cleanups git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3118 4912f4e0-d625-0410-9fb7-b9a5a253dbdc --- src/nm-device-802-3-ethernet.c | 2 -- src/nm-hal-manager.c | 2 +- src/nm-serial-device.c | 8 +++++--- src/nm-umts-device.c | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/nm-device-802-3-ethernet.c b/src/nm-device-802-3-ethernet.c index 589b83805f..c61cf5d466 100644 --- a/src/nm-device-802-3-ethernet.c +++ b/src/nm-device-802-3-ethernet.c @@ -243,8 +243,6 @@ nm_device_802_3_ethernet_new (const char *udi, const char *iface, const char *driver) { - GObject *obj; - g_return_val_if_fail (udi != NULL, NULL); g_return_val_if_fail (iface != NULL, NULL); g_return_val_if_fail (driver != NULL, NULL); diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c index 03def21262..647cab0567 100644 --- a/src/nm-hal-manager.c +++ b/src/nm-hal-manager.c @@ -186,7 +186,7 @@ is_modem_device (NMHalManager *manager, const char *udi) return is_modem; } -NMDevice * +static NMDevice * modem_device_creator (NMHalManager *manager, const char *udi) { char *serial_device; diff --git a/src/nm-serial-device.c b/src/nm-serial-device.c index 9fcc9b53dd..3ab8b53912 100644 --- a/src/nm-serial-device.c +++ b/src/nm-serial-device.c @@ -1,5 +1,7 @@ /* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +#define _GNU_SOURCE /* for strcasestr() */ + #include #include #include @@ -508,7 +510,7 @@ wait_for_reply_got_data (GIOChannel *source, char buf[4096]; GIOStatus status; gboolean done = FALSE; - int index = -1; + int idx = -1; int i; if (condition & G_IO_IN) { @@ -531,7 +533,7 @@ wait_for_reply_got_data (GIOChannel *source, for (i = 0; info->str_needles[i]; i++) { if (strcasestr (buf, info->str_needles[i])) { - index = i; + idx = i; done = TRUE; } } @@ -543,7 +545,7 @@ wait_for_reply_got_data (GIOChannel *source, done = TRUE; if (done) { - info->callback (info->device, index, info->user_data); + info->callback (info->device, idx, info->user_data); /* Clear the id - returning FALSE already removes it */ info->got_data_id = 0; diff --git a/src/nm-umts-device.c b/src/nm-umts-device.c index de0f77f6db..5ad84cc5a5 100644 --- a/src/nm-umts-device.c +++ b/src/nm-umts-device.c @@ -145,7 +145,7 @@ get_network_done (NMSerialDevice *device, static void automatic_registration_get_network (NMSerialDevice *device) { - char terminators[] = { '\r', '\n', NULL }; + char terminators[] = { '\r', '\n', '\0' }; nm_serial_device_send_command_string (device, "AT+COPS?"); nm_serial_device_get_reply (device, 10, terminators, get_network_done, NULL); @@ -355,7 +355,6 @@ nm_umts_device_init (NMUmtsDevice *self) static void nm_umts_device_class_init (NMUmtsDeviceClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); NMDeviceClass *device_class = NM_DEVICE_CLASS (klass); device_class->get_generic_capabilities = real_get_generic_capabilities;