diff mbox

[PATCHv2,06/29] iguanair: shut up a gcc warning on avr32 arch

Message ID 1383399097-11615-7-git-send-email-m.chehab@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mauro Carvalho Chehab Nov. 2, 2013, 1:31 p.m. UTC
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(+)

Comments

Sean Young Nov. 3, 2013, 10:10 p.m. UTC | #1
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 mbox

Patch

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;
 		}