https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7757
--- Comment #4 from Jaap Keuter <jaap.keuter@xxxxxxxxx> 2012-10-05 14:31:20 PDT ---
(In reply to comment #3)
This is what I get building with this patch
--------------8<---------------------------
packet-lldp.c: In function 'dissect_organizational_specific_tlv':
packet-lldp.c:2407:10: warning: variable 'tempTree' set but not used
[-Wunused-but-set-variable]
packet-lldp.c: At top level:
packet-lldp.c:224:13: error: 'ett_org_spc_mediaClass_0' defined but not used
[-Werror=unused-variable]
packet-lldp.c:225:13: error: 'ett_org_spc_mediaClass_1' defined but not used
[-Werror=unused-variable]
packet-lldp.c:226:13: error: 'ett_org_spc_mediaClass_2' defined but not used
[-Werror=unused-variable]
packet-lldp.c:227:13: error: 'ett_org_spc_mediaClass_3' defined but not used
[-Werror=unused-variable]
packet-lldp.c:228:13: error: 'ett_org_spc_mediaClass_4' defined but not used
[-Werror=unused-variable]
cc1: all warnings being treated as errors
--------------8<---------------------------
So this doesn't work that way.
Another thing. Instead of changing the field type of hf_unknown_subtype into
FT_BYTES, you should change its incorrect use:
Index: packet-lldp.c
===================================================================
--- packet-lldp.c (revision 45319)
+++ packet-lldp.c (working copy)
@@ -2306,7 +2306,7 @@
break;
}
default:
- proto_tree_add_item(tree, hf_unknown_subtype, tvb, offset, -1,
ENC_NA);
+ proto_tree_add_item(tree, hf_unknown_subtype_content, tvb,
offset, -1, ENC_NA);
}
}
@@ -2340,7 +2340,7 @@
}
break;
default:
- proto_tree_add_item(tree, hf_unknown_subtype, tvb, offset, 1,
ENC_NA);
+ proto_tree_add_item(tree, hf_unknown_subtype_content, tvb,
offset, -1, ENC_NA);
break;
}
}
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.