diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-07-23 12:26:05 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2014-09-22 10:52:03 +0000 |
commit | 56a09d24dcdcaddae1cb67a18bbc2fd588c427ed (patch) | |
tree | a9961e4700a00680f7247d714709e6164f9e5d9d /epan/dissectors/packet-usb-audio.c | |
parent | c1d6a4123a2e100a77ae8ec2b3d01544f168febc (diff) |
Try to fix some buildbot warnings
Most interesting are:
warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
warning: ISO C forbids zero-size array [-Wpedantic]
warning: ISO C90 doesn't support unnamed structs/unions [-Wpedantic]
warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual
warning: initializer element is not computable at load time [enabled by default]
Change-Id: I5573c6bdca856a304877d9bef643f8c0fa93cdaf
Reviewed-on: https://code.wireshark.org/review/3174
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-usb-audio.c')
-rw-r--r-- | epan/dissectors/packet-usb-audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-usb-audio.c b/epan/dissectors/packet-usb-audio.c index 9bee878197..0b654b36d6 100644 --- a/epan/dissectors/packet-usb-audio.c +++ b/epan/dissectors/packet-usb-audio.c @@ -490,7 +490,7 @@ dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tre { usb_conv_info_t *usb_conv_info; proto_tree *tree = NULL; - guint offset; + gint offset; guint length = tvb_length(tvb); @@ -515,7 +515,7 @@ dissect_usb_audio_bulk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tre offset = 0; col_set_str(pinfo->cinfo, COL_INFO, "USB-MIDI Event Packets"); - while (offset < length) + while (offset > 0 && (guint) offset < length) { dissect_usb_midi_event(tvb, pinfo, tree, parent_tree, offset); offset += 4; |