[obexd] GCC 4.6 warning fixes

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

 



As for bluez.
>From cc010c73caa98195f62340dc28e4f705dfd191d0 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@xxxxxxxxxx>
Date: Fri, 6 May 2011 15:50:31 +0100
Subject: [PATCH] Fix GCC 4.6 warnings about unused variables

---
 btio/btio.c      |    4 ++++
 client/session.c |    3 ---
 gdbus/object.c   |    3 +--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/btio/btio.c b/btio/btio.c
index 8b273ca..1d8101a 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -1067,6 +1067,10 @@ gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
 	if (!(pfd.revents & POLLOUT)) {
 		int ret;
 		ret = read(sock, &c, 1);
+		if (ret < 0) {
+			ERROR_FAILED(err, "read", errno);
+			return FALSE;
+		}
 	}
 
 	accept_add(io, connect, user_data, destroy);
diff --git a/client/session.c b/client/session.c
index 88eae8d..ceda3f4 100644
--- a/client/session.c
+++ b/client/session.c
@@ -516,10 +516,7 @@ struct session_data *session_create(const char *source,
 
 void session_shutdown(struct session_data *session)
 {
-	struct transfer_data *transfer;
-
 	DBG("%p", session);
-	transfer = session->pending ? session->pending->data : NULL;
 
 	session_ref(session);
 
diff --git a/gdbus/object.c b/gdbus/object.c
index eaa2e1a..d17a101 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -255,14 +255,13 @@ void g_dbus_pending_success(DBusConnection *connection,
 
         for (list = pending_security; list; list = list->next) {
 		struct security_data *secdata = list->data;
-		DBusHandlerResult result;
 
 		if (secdata->pending != pending)
 			continue;
 
 		pending_security = g_slist_remove(pending_security, secdata);
 
-		result = process_message(connection, secdata->message,
+		process_message(connection, secdata->message,
 				secdata->method, secdata->iface_user_data);
 
 		dbus_message_unref(secdata->message);
-- 
1.7.5


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux