forked from osmocom/wireshark
Remove dead code. Fixes Coverity CID 228. Squelch various compiler warnings.
svn path=/trunk/; revision=20553
This commit is contained in:
parent
e97d1f0866
commit
c5a181d425
|
@ -2,7 +2,7 @@
|
|||
* Routines for ETSI Distribution & Communication Protocol
|
||||
* Copyright 2006, British Broadcasting Corporation
|
||||
*
|
||||
* $Id:$
|
||||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
|
@ -195,7 +195,7 @@ void rs_deinterleave(const guint8 *input, guint8 *output, guint16 plen, guint32
|
|||
|
||||
static
|
||||
gboolean rs_correct_data(guint8 *deinterleaved, guint8 *output,
|
||||
guint32 c_max, guint16 rsk, guint16 rsz)
|
||||
guint32 c_max, guint16 rsk, guint16 rsz _U_)
|
||||
{
|
||||
guint32 i, index_coded = 0, index_out = 0;
|
||||
int err_corr;
|
||||
|
@ -223,7 +223,7 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
guint16 seq,
|
||||
gint offset,
|
||||
guint16 plen,
|
||||
gboolean fec,
|
||||
gboolean fec _U_,
|
||||
guint16 rsk,
|
||||
guint16 rsz,
|
||||
fragment_data *fd
|
||||
|
@ -464,7 +464,7 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
if (tree) {
|
||||
proto_item *ci = NULL;
|
||||
guint header_len = offset+2;
|
||||
const guint8 *crc_buf = tvb_get_ptr(tvb, 0, header_len);
|
||||
const char *crc_buf = (const char *) tvb_get_ptr(tvb, 0, header_len);
|
||||
unsigned long c = crc_drm(crc_buf, header_len, 16, 0x11021, 1);
|
||||
ci = proto_tree_add_item (pft_tree, hf_edcp_hcrc, tvb, offset, 2, FALSE);
|
||||
proto_item_append_text(ci, " (%s)", (c==0xe2f0)?"Ok":"bad");
|
||||
|
@ -559,7 +559,7 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
ci = proto_tree_add_item (af_tree, hf_edcp_crc, tvb, offset, 2, FALSE);
|
||||
if (ver & 0x80) { /* crc valid */
|
||||
guint len = offset+2;
|
||||
const guint8 *crc_buf = tvb_get_ptr(tvb, 0, len);
|
||||
const char *crc_buf = (const char *) tvb_get_ptr(tvb, 0, len);
|
||||
unsigned long c = crc_drm(crc_buf, len, 16, 0x11021, 1);
|
||||
if (tree) {
|
||||
proto_item_append_text(ci, " (%s)", (c==0xe2f0)?"Ok":"bad");
|
||||
|
@ -599,14 +599,14 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
tpl_tree = proto_item_add_subtree (ti, ett_tpl);
|
||||
}
|
||||
while(offset<tvb_length(tvb)) {
|
||||
guint32 bits;
|
||||
guint32 bytes;
|
||||
char *tag = (char*)tvb_get_string (tvb, offset, 4); offset += 4;
|
||||
bits = tvb_get_ntohl(tvb, offset); offset += 4;
|
||||
bytes = bits / 8;
|
||||
if(bits % 8)
|
||||
bytes++;
|
||||
if(tree) {
|
||||
guint32 bits;
|
||||
guint32 bytes;
|
||||
char *tag = (char*)tvb_get_string (tvb, offset, 4); offset += 4;
|
||||
bits = tvb_get_ntohl(tvb, offset); offset += 4;
|
||||
bytes = bits / 8;
|
||||
if(bits % 8)
|
||||
bytes++;
|
||||
if(tree) {
|
||||
proto_item *i = NULL;
|
||||
const guint8 *p = tvb_get_ptr(tvb, offset, bytes);
|
||||
if(strcmp(tag, "*ptr")==0) {
|
||||
|
@ -622,12 +622,8 @@ dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
}
|
||||
offset += bytes;
|
||||
}
|
||||
if(prot) {
|
||||
if(tree) {
|
||||
dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent);
|
||||
} else {
|
||||
dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, NULL);
|
||||
}
|
||||
if(prot) { /* prot is non-NULL only if we have our tree. */
|
||||
dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue