aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-04-16 12:28:03 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-04-16 12:28:03 +0000
commit6a0cbfbce851f440268cec5929916037097f8c39 (patch)
treed51d23dfeec0c2c9178bced6af8e249f1fdb9e2c
parentffae0f912d46278e408eb9e8ccd4386e1a3722bb (diff)
Fix:
packet-rohc.c: In function 'dissect_rohc_ir_rtp_profile_dynamic': packet-rohc.c:285: warning: 'val_len' may be used uninitialized in this function packet-rohc.c:186: warning: 'num_bits' may be used uninitialized in this function packet-rohc.c:186: note: 'num_bits' was declared here svn path=/trunk/; revision=36663
-rw-r--r--epan/dissectors/packet-rohc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c
index 7fce4da1b1..71615c1819 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -183,7 +183,7 @@ static guint32
get_self_describing_var_len_val(tvbuff_t *tvb, proto_tree *tree, int offset, int hf_index, guint8 *val_len){
guint8 oct;
guint32 val;
- int num_bits, bit_offset = offset <<3;
+ int num_bits = 0, bit_offset = offset <<3;
oct = tvb_get_guint8(tvb, offset);
if((oct&0x80)==0){
@@ -282,7 +282,7 @@ dissect_rohc_ir_rtp_profile_dynamic(tvbuff_t *tvb, proto_tree *tree, int offset,
proto_item *item;
proto_tree *sub_tree;
- guint8 oct, rx, cc, val_len;
+ guint8 oct, rx, cc, val_len = 0;
int i, start_offset;
start_offset = offset;
@@ -399,7 +399,6 @@ dissect_rohc_ir_rtp_profile_dynamic(tvbuff_t *tvb, proto_tree *tree, int offset,
/* Time_Stride encoded as
* 4.5.6. Self-describing variable-length values
*/
- val_len = 0;
get_self_describing_var_len_val(tvb, sub_tree, offset, hf_rohc_rtp_time_stride, &val_len);
offset = offset + val_len;
}