Commit 0d480db8 authored by Jeff Garzik's avatar Jeff Garzik

drivers/telephony/ixj: cleanup and fix gcc warning

1) Fix gcc uninit'd var warnings by adding 'default' switch stmt labels
in two cases.  It was lightning-strikes unlikely that a problem would
ever arise, but not impossible.

2) Tighten the scope of 'blankword' in two cases.
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 79c63e19
...@@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j) ...@@ -3453,7 +3453,6 @@ static void ixj_write_frame(IXJ *j)
{ {
int cnt, frame_count, dly; int cnt, frame_count, dly;
IXJ_WORD dat; IXJ_WORD dat;
BYTES blankword;
frame_count = 0; frame_count = 0;
if(j->flags.cidplay) { if(j->flags.cidplay) {
...@@ -3501,6 +3500,8 @@ static void ixj_write_frame(IXJ *j) ...@@ -3501,6 +3500,8 @@ static void ixj_write_frame(IXJ *j)
} }
if (frame_count >= 1) { if (frame_count >= 1) {
if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) { if (j->ver.low == 0x12 && j->play_mode && j->flags.play_first_frame) {
BYTES blankword;
switch (j->play_mode) { switch (j->play_mode) {
case PLAYBACK_MODE_ULAW: case PLAYBACK_MODE_ULAW:
case PLAYBACK_MODE_ALAW: case PLAYBACK_MODE_ALAW:
...@@ -3508,6 +3509,7 @@ static void ixj_write_frame(IXJ *j) ...@@ -3508,6 +3509,7 @@ static void ixj_write_frame(IXJ *j)
break; break;
case PLAYBACK_MODE_8LINEAR: case PLAYBACK_MODE_8LINEAR:
case PLAYBACK_MODE_16LINEAR: case PLAYBACK_MODE_16LINEAR:
default:
blankword.low = blankword.high = 0x00; blankword.low = blankword.high = 0x00;
break; break;
case PLAYBACK_MODE_8LINEAR_WSS: case PLAYBACK_MODE_8LINEAR_WSS:
...@@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j) ...@@ -3531,6 +3533,8 @@ static void ixj_write_frame(IXJ *j)
j->flags.play_first_frame = 0; j->flags.play_first_frame = 0;
} else if (j->play_codec == G723_63 && j->flags.play_first_frame) { } else if (j->play_codec == G723_63 && j->flags.play_first_frame) {
for (cnt = 0; cnt < 24; cnt++) { for (cnt = 0; cnt < 24; cnt++) {
BYTES blankword;
if(cnt == 12) { if(cnt == 12) {
blankword.low = 0x02; blankword.low = 0x02;
blankword.high = 0x00; blankword.high = 0x00;
...@@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr) ...@@ -4868,6 +4872,7 @@ static char daa_CR_read(IXJ *j, int cr)
bytes.high = 0xB0 + cr; bytes.high = 0xB0 + cr;
break; break;
case SOP_PU_PULSEDIALING: case SOP_PU_PULSEDIALING:
default:
bytes.high = 0xF0 + cr; bytes.high = 0xF0 + cr;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment