Prev: move eject code from zd1211rw to usb-storage
Next: [PATCH -tip 14/14] perf probe: Fix to show which probe point is not found
From: Dan Carpenter on 15 Dec 2009 09:30 On Thu, Dec 10, 2009 at 10:50:12PM -0800, Steven King wrote: > +static void hmc5843_poll(struct input_polled_dev *ipdev) > +{ > + struct hmc5843 *hmc5843 = ipdev->private; > + int x, y, z; > + CC drivers/input/misc/hmc5843.o drivers/input/misc/hmc5843.c: In function 'hmc5843_poll': drivers/input/misc/hmc5843.c:312: warning: 'x' may be used uninitialized in this function drivers/input/misc/hmc5843.c:312: warning: 'y' may be used uninitialized in this function drivers/input/misc/hmc5843.c:312: warning: 'z' may be used uninitialized in this function > + mutex_lock(&hmc5843->lock); > + if (!hmc5843_read_xyz(hmc5843, &x, &y, &z)) { > + input_report_abs(ipdev->input, ABS_X, x); > + input_report_abs(ipdev->input, ABS_Y, y); > + input_report_abs(ipdev->input, ABS_Z, z); > + input_sync(ipdev->input); > + } > + mutex_unlock(&hmc5843->lock); > +} > + Some versions of gcc may not complain, but could you suppress the warnings anyway? regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |