diff options
author | Evan Huus <eapache@gmail.com> | 2013-05-20 19:56:04 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-05-20 19:56:04 +0000 |
commit | 98d005506a66e984f579d8f549933241ee175a5a (patch) | |
tree | 6f03fab84ccdb70295e4742060297165646fe46c /epan/dissectors/packet-asterix.c | |
parent | 230205de791ce262dc153007e9f81144f56f91b2 (diff) |
Fix some compile warnings, and spread a struct definition over multiple
lines to make it obvious where the 32-bit cast is needed, since it's not
at all obvious to me...
svn path=/trunk/; revision=49458
Diffstat (limited to 'epan/dissectors/packet-asterix.c')
-rw-r--r-- | epan/dissectors/packet-asterix.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/epan/dissectors/packet-asterix.c b/epan/dissectors/packet-asterix.c index 2056c12576..a0e374905a 100644 --- a/epan/dissectors/packet-asterix.c +++ b/epan/dissectors/packet-asterix.c @@ -1465,7 +1465,12 @@ static const value_string valstr_XXX_FX[] = { { 1, "Extension into next extent" }, { 0, NULL } }; -static const FieldPart IXXX_FX = { 1, 1.0, FIELD_PART_FX, &hf_XXX_FX, NULL }; +static const FieldPart IXXX_FX = { + 1, + 1.0, + FIELD_PART_FX, + &hf_XXX_FX, + NULL }; static const FieldPart IXXX_1bit_spare = { 1, 1.0, FIELD_PART_UINT, NULL, NULL }; static const FieldPart IXXX_2bit_spare = { 2, 1.0, FIELD_PART_UINT, NULL, NULL }; static const FieldPart IXXX_3bit_spare = { 3, 1.0, FIELD_PART_UINT, NULL, NULL }; @@ -4332,7 +4337,7 @@ static void dissect_asterix_data_block (tvbuff_t *tvb, guint offset, proto_tree static gint dissect_asterix_fields (tvbuff_t *tvb, guint offset, proto_tree *tree, guint8 category, const AsterixField *current_uap[]) { - uint i, j, size, start, len, inner_offset, fspec_len; + guint i, j, size, start, len, inner_offset, fspec_len; guint64 counter; proto_item *asterix_field_item = NULL; proto_tree *asterix_field_tree = NULL; @@ -4459,10 +4464,10 @@ static guint8 asterix_fspec_len (tvbuff_t *tvb, guint offset) return i + 1; } -static guint8 asterix_field_exists (tvbuff_t *tvb, guint offset, int index) +static guint8 asterix_field_exists (tvbuff_t *tvb, guint offset, int bitIndex) { guint8 bitNo, i; - bitNo = index + index / 7; + bitNo = bitIndex + bitIndex / 7; for (i = 0; i < bitNo / 8; i++) { if (!(tvb_get_guint8 (tvb, offset + i) & 1)) return 0; } |