Skip to content

Commit

Permalink
More checking ett entries are registered
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmath committed Nov 28, 2024
1 parent 5459d6a commit ca8c208
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions epan/dissectors/packet-thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -3473,6 +3473,9 @@ proto_register_thread_nm(void)
static int *ett[] = {
&ett_thread_nm,
&ett_thread_nm_tlv,
/* These need to be registered somewhere.. */
&ett_thread,
&ett_thread_ie_fields
};

static ei_register_info ei[] = {
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -7478,7 +7478,7 @@ proto_register_usb(void)
},
};

static int *usb_subtrees[] = {
static int *usb_ett[] = {
&ett_usb_hdr,
&ett_usb_setup_hdr,
&ett_usb_isodesc,
Expand Down Expand Up @@ -7537,7 +7537,7 @@ proto_register_usb(void)

proto_register_field_array(proto_usb, hf, array_length(hf));
proto_register_field_array(proto_usbport, hf_usbport, array_length(hf_usbport));
proto_register_subtree_array(usb_subtrees, array_length(usb_subtrees));
proto_register_subtree_array(usb_ett, array_length(usb_ett));
proto_register_subtree_array(usbport_ett, array_length(usbport_ett));

expert_usb = expert_register_protocol(proto_usb);
Expand Down
6 changes: 3 additions & 3 deletions tools/check_typed_item_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,9 +2039,9 @@ def checkFile(filename, check_mask=False, mask_exact_width=False, check_label=Fa
ett_defined = findDefinedTrees(filename, ett_declared)
for d in ett_declared:
if d not in ett_defined:
global errors_found
print(filename, 'subtree identifier', d, 'is declared but not found in an array for registering')
errors_found += 1
global warnings_found
print('Warning:', filename, 'subtree identifier', d, 'is declared but not found in an array for registering')
warnings_found += 1

items_declared = {}
if check_missing_items:
Expand Down

0 comments on commit ca8c208

Please sign in to comment.