[PATCH -mm] ixj gcc 4.1 warning fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

Index: linux-2.6.16/drivers/telephony/ixj.c
===================================================================
--- linux-2.6.16.orig/drivers/telephony/ixj.c
+++ linux-2.6.16/drivers/telephony/ixj.c
@@ -3445,7 +3445,7 @@ static void ixj_write_frame(IXJ *j)
 {
 	int cnt, frame_count, dly;
 	IXJ_WORD dat;
-	BYTES blankword;
+	BYTES blankword = { .high = 0, .low = 0};
 
 	frame_count = 0;
 	if(j->flags.cidplay) {
@@ -3503,6 +3503,7 @@ static void ixj_write_frame(IXJ *j)
 					blankword.low = blankword.high = 0x00;
 					break;
 				case PLAYBACK_MODE_8LINEAR_WSS:
+				default:
 					blankword.low = blankword.high = 0x80;
 					break;
 				}
@@ -4844,7 +4845,7 @@ static char daa_int_read(IXJ *j)
 static char daa_CR_read(IXJ *j, int cr)
 {
 	IXJ_WORD wdata;
-	BYTES bytes;
+	BYTES bytes = { .high = 0, .low = 0};
 
 	if (!SCI_Prepare(j))
 		return 0;
@@ -4860,6 +4861,7 @@ static char daa_CR_read(IXJ *j, int cr)
 		bytes.high = 0xB0 + cr;
 		break;
 	case SOP_PU_PULSEDIALING:
+	default:
 		bytes.high = 0xF0 + cr;
 		break;
 	}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux