Skip to content

Commit

Permalink
Avoid a compiler static analysis warning.
Browse files Browse the repository at this point in the history
Move a variable declaration/initialization into the only scope where
it is actually used.

Signed-off-by: Jim Stichnoth <jstichnoth@mythtv.org>
  • Loading branch information
garybuhrmaster authored and stichnot committed May 28, 2013
1 parent 3ba5595 commit 887e60b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/cc708decoder.cpp
Expand Up @@ -611,7 +611,6 @@ static void parse_cc_packet(CC708Reader* cb_cbs, CaptionPacket* pkt,
int service_number = 0;
int block_data_offset = 0;
int len = ((((int)pkt_buf[0]) & 0x3f)<<1) - 1;
int seq_num = (((int)pkt_buf[0])>>6)&0x3;

if (len < 0)
return;
Expand All @@ -626,6 +625,7 @@ static void parse_cc_packet(CC708Reader* cb_cbs, CaptionPacket* pkt,
{
int j;
int srv = (pkt_buf[off]>>5) & 0x7;
int seq_num = (((int)pkt_buf[0])>>6)&0x3;
QString msg = QString("CC708 len %1 srv0 %2 seq %3 ").arg(len, 2)
.arg(srv) .arg(seq_num);
for (j = 0; j < pkt_size; j++)
Expand Down

0 comments on commit 887e60b

Please sign in to comment.