[PATCH] Fix unused variable warning in rfcomm

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

 



The following patch fixes a warning generated when compiling rfcomm.c
without CONFIG_BT_RFCOMM_DEBUG.
The warning was:
net/bluetooth/rfcomm/sock.c: In function ‘rfcomm_sock_ioctl’:
net/bluetooth/rfcomm/sock.c:795: warning: unused variable ‘sk’

Patch is against 2.6.28.1

Signed-off-by: Daniele Venzano <venza@xxxxxxxxxxxx>

--- a/net/bluetooth/rfcomm/sock.c	2009-01-23 10:30:34.000000000 +0100
+++ b/net/bluetooth/rfcomm/sock.c	2009-01-23 10:31:25.000000000 +0100
@@ -792,7 +792,9 @@ static int rfcomm_sock_getsockopt(struct
 
 static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
 {
+#ifdef CONFIG_BT_RFCOMM_DEBUG
 	struct sock *sk = sock->sk;
+#endif
 	int err;
 
 	BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux