summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lirc
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-08-17 17:41:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-31 14:49:22 -0700
commit211673991ec168c293791a94ad7aa31998907768 (patch)
treeba59b86b66840352de84f14f15d58ab417fe44ba /drivers/staging/lirc
parentc37c6d2196fc716abac6531c4cf08ad2874d52d8 (diff)
downloadlinux-211673991ec168c293791a94ad7aa31998907768.tar.gz
linux-211673991ec168c293791a94ad7aa31998907768.tar.bz2
linux-211673991ec168c293791a94ad7aa31998907768.zip
Staging: lirc: fix compiler warning
On Fri, Aug 13, 2010 at 03:38:40PM +0200, Dan Carpenter wrote: > Speak of left over stuff, it's weird that I didn't notice this before > but gcc complains about an unitialized variable in > imon_incoming_packet(). > > drivers/staging/lirc/lirc_imon.c: In function ‘imon_incoming_packet’: > drivers/staging/lirc/lirc_imon.c:661: warning: ‘chunk_num’ may be used > uninitialized in this function > > I don't know how to fix that, but it looks important. Ew. Yeah, that doesn't look so hot like it is right now. The old lirc_imon driver had chunk_num = buf[7], and made much more extensive use of chunk_num. Simply removing chunk_num and using buf[7] should be fine. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/lirc')
-rw-r--r--drivers/staging/lirc/lirc_imon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c
index cb5699c5b885..818bec0bb912 100644
--- a/drivers/staging/lirc/lirc_imon.c
+++ b/drivers/staging/lirc/lirc_imon.c
@@ -596,7 +596,7 @@ static void imon_incoming_packet(struct imon_context *context,
struct device *dev = context->driver->dev;
int octet, bit;
unsigned char mask;
- int i, chunk_num;
+ int i;
/*
* just bail out if no listening IR client
@@ -655,7 +655,7 @@ static void imon_incoming_packet(struct imon_context *context,
}
}
- if (chunk_num == 10) {
+ if (buf[7] == 10) {
if (context->rx.count) {
submit_data(context);
context->rx.count = 0;