linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix gcc 4.6.0 set but not used warning messages.
@ 2010-06-14 20:26 Justin P. Mattock
  2010-06-14 20:26 ` [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used Justin P. Mattock
  0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-14 20:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: reiserfs-devel, linux-bluetooth, clemens, debora, dri-devel,
	linux-i2c, linux1394-devel, linux-media




First and foremost, I must
thank anybody taking the time to even
look at these(I know you people have better
things to be doing).

And secondly here is my try at trying
to fix some of the warning messages
spammed by gcc 4.6.0 when building the
kernel. Some of them I removed, and
some of them I just shut off.

Note: Removing the code does seem like a
good approach(if it's actually dead),
but if not then something needs
to be fixed.
As for shutting off the code to shutup gcc
does seem like a temporary fix, but would
rather have a warning message, than see it get
lost in the sands of time.

In any case Thanks for taking the time,
and hopefully we can get fixes for all of
this mess generated by gcc..

Justin P. Mattock


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used
  2010-06-14 20:26 [PATCH 0/8] Fix gcc 4.6.0 set but not used warning messages Justin P. Mattock
@ 2010-06-14 20:26 ` Justin P. Mattock
  2010-06-15  0:24   ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-06-14 20:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: reiserfs-devel, linux-bluetooth, clemens, debora, dri-devel,
	linux-i2c, linux1394-devel, linux-media, Justin P. Mattock

Im getting this while building:
  CC [M]  drivers/bluetooth/hci_ldisc.o
drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame':
drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used

the below fixed it for me, but am not sure if
it's correct.

 Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>

---
 drivers/bluetooth/hci_ldisc.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 76a1abb..f693dfe 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -210,7 +210,6 @@ static int hci_uart_close(struct hci_dev *hdev)
 static int hci_uart_send_frame(struct sk_buff *skb)
 {
 	struct hci_dev* hdev = (struct hci_dev *) skb->dev;
-	struct tty_struct *tty;
 	struct hci_uart *hu;
 
 	if (!hdev) {
@@ -222,8 +221,7 @@ static int hci_uart_send_frame(struct sk_buff *skb)
 		return -EBUSY;
 
 	hu = (struct hci_uart *) hdev->driver_data;
-	tty = hu->tty;
-
+	
 	BT_DBG("%s: type %d len %d", hdev->name, bt_cb(skb)->pkt_type, skb->len);
 
 	hu->proto->enqueue(hu, skb);
-- 
1.7.1.rc1.21.gf3bd6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used
  2010-06-14 20:26 ` [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used Justin P. Mattock
@ 2010-06-15  0:24   ` Gustavo F. Padovan
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-06-15  0:24 UTC (permalink / raw)
  To: Justin P. Mattock
  Cc: linux-kernel, reiserfs-devel, linux-bluetooth, clemens, debora,
	dri-devel, linux-i2c, linux1394-devel, linux-media

Hi Justin,

* Justin P. Mattock <justinmattock@gmail.com> [2010-06-14 13:26:42 -0700]:

> Im getting this while building:
>   CC [M]  drivers/bluetooth/hci_ldisc.o
> drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_send_frame':
> drivers/bluetooth/hci_ldisc.c:213:21: warning: variable 'tty' set but not used
> 
> the below fixed it for me, but am not sure if
> it's correct.


The fix is correct, you just need to fix the trailing whitespace
problem and resend it.
Also we use "Bluetooth:" as part of the commit message on the bluetooth
subsystem. For example:

"Bluetooth: Remove set but not used varible 'tty' 

Or something like that.

-- 
Gustavo F. Padovan
http://padovan.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-15  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-14 20:26 [PATCH 0/8] Fix gcc 4.6.0 set but not used warning messages Justin P. Mattock
2010-06-14 20:26 ` [PATCH 2/8]bluetooth/hci_ldisc.c Fix warning: variable 'tty' set but not used Justin P. Mattock
2010-06-15  0:24   ` Gustavo F. Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).