Re: [PATCH -mm] ixj gcc 4.1 warning fix

From: Alan Cox
Date: Wed May 10 2006 - 06:28:36 EST


On Maw, 2006-05-09 at 19:55 -0700, Daniel Walker wrote:
> Fixes the following warnings,
>
> drivers/telephony/ixj.c: In function 'ixj_pstn_state':
> drivers/telephony/ixj.c:4847: warning: 'bytes.high' may be used uninitialized in this function
> drivers/telephony/ixj.c: In function 'ixj_write_frame':
> drivers/telephony/ixj.c:3448: warning: 'blankword.high' may be used uninitialized in this function
> drivers/telephony/ixj.c:3448: warning: 'blankword.low' may be used uninitialized in this function
>
> Signed-Off-By: Daniel Walker <dwalker@xxxxxxxxxx>

No this is not a good idea either. The missing default case stuff is as
far as I can see from inspection not neccessary. If anything you want to
add

default:
BUG();

since those are impossible cases.

The unusued variables also appear to be just compiler confusion.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/