Message ID | 1383399097-11615-7-git-send-email-m.chehab@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Nov 02, 2013 at 11:31:14AM -0200, Mauro Carvalho Chehab wrote: > drivers/media/rc/iguanair.c: In function 'iguanair_set_tx_carrier': > drivers/media/rc/iguanair.c:304: warning: 'sevens' may be used uninitialized in this function > > This is clearly a gcc bug, but it doesn't hurt to add a default line > at the switch to shut it up. Mauro, I have a different way of solving this which also cleans up the code a little. I'll send a patch shortly. Sean -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/rc/iguanair.c b/drivers/media/rc/iguanair.c index 19632b1c2190..67e5667db2eb 100644 --- a/drivers/media/rc/iguanair.c +++ b/drivers/media/rc/iguanair.c @@ -320,6 +320,7 @@ static int iguanair_set_tx_carrier(struct rc_dev *dev, uint32_t carrier) sevens = 2; break; case 3: + default: sevens = 1; break; }
drivers/media/rc/iguanair.c: In function 'iguanair_set_tx_carrier': drivers/media/rc/iguanair.c:304: warning: 'sevens' may be used uninitialized in this function This is clearly a gcc bug, but it doesn't hurt to add a default line at the switch to shut it up. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> --- drivers/media/rc/iguanair.c | 1 + 1 file changed, 1 insertion(+)