aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bacapp.c
diff options
context:
space:
mode:
authorDirk Römmen <dirk.roemmen@cslab.de>2017-12-29 08:05:42 +0100
committerAnders Broman <a.broman58@gmail.com>2017-12-29 14:15:48 +0000
commit0c4a307ee5d94bedf7410c5b0d0e18ae502561f5 (patch)
tree28b49fb45a75170cff5d87cb5d2a51b14379d5a7 /epan/dissectors/packet-bacapp.c
parentd089cca16b56fd72a69373e97b79eaca8f9e154b (diff)
Corrected gcc-7 compilation warning "implicit fallthrough" in BACnet dissector.
Change-Id: I28c1d2b811209f9e3e606244cf420356af1ddecf Reviewed-on: https://code.wireshark.org/review/25060 Reviewed-by: Dario Lombardo <lomato@gmail.com> Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-bacapp.c')
-rw-r--r--epan/dissectors/packet-bacapp.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c
index 59ccb8cbae..e2c2d0dac7 100644
--- a/epan/dissectors/packet-bacapp.c
+++ b/epan/dissectors/packet-bacapp.c
@@ -7696,6 +7696,7 @@ fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
guint lastoffset = 0, depth = 0;
char ar[256];
guint32 save_object_type;
+ gboolean do_default_handling;
if (propertyIdentifier >= 0) {
g_snprintf(ar, sizeof(ar), "%s: ",
@@ -7713,6 +7714,8 @@ fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
if (depth <= 0) return offset;
}
+ do_default_handling = FALSE;
+
/* Application Tags */
switch (propertyIdentifier) {
case 0: /* acked-transitions */
@@ -8262,40 +8265,41 @@ fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
if ( object_type == 11 ) /* group object handling of present-value */
{
offset = fReadAccessResult(tvb, pinfo, tree, offset);
- break;
}
else if (object_type == 30) /* access-door object */
{
- offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetDoorValue);
- break;
+ offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetDoorValue);
}
else if (object_type == 21) /* life-point */
{
- offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetLifeSafetyState);
- break;
+ offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetLifeSafetyState);
}
else if (object_type == 22) /* life-zone */
{
- offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetLifeSafetyState);
- break;
+ offset = fEnumeratedTag(tvb, pinfo, tree, offset, ar, BACnetLifeSafetyState);
}
else if (object_type == 53) /* channel object */
{
- offset = fChannelValue(tvb, pinfo, tree, offset, ar);
- break;
+ offset = fChannelValue(tvb, pinfo, tree, offset, ar);
}
else if (object_type == 37) /* crederntial-data-input */
{
- offset = fAuthenticationFactor(tvb, pinfo, tree, offset);
- break;
+ offset = fAuthenticationFactor(tvb, pinfo, tree, offset);
}
else if (object_type == 26) /* global-group */
{
- offset = fPropertyAccessResult(tvb, pinfo, tree, offset);
- break;
+ offset = fPropertyAccessResult(tvb, pinfo, tree, offset);
}
- /* intentially fall through here so don't reorder this case statement */
+ else
+ {
+ do_default_handling = TRUE;
+ }
+ break;
default:
+ do_default_handling = TRUE;
+ break;
+ }
+ if (do_default_handling) {
if (tag_info) {
if (tag_is_opening(tag_info)) {
++depth;
@@ -8309,7 +8313,6 @@ fAbstractSyntaxNType(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
} else {
offset = fApplicationTypes(tvb, pinfo, tree, offset, ar);
}
- break;
}
if (offset == lastoffset) break; /* nothing happened, exit loop */
}