Wireshark-bugs: [Wireshark-bugs] [Bug 9418] New dissector: Kyoto Tycoon binary protocol

Date: Mon, 11 Nov 2013 19:28:50 +0000

changed bug 9418

What Removed Added
Attachment #12056 Flags review_for_checkin? review_for_checkin-

Comment # 5 on bug 9418 from
Comment on attachment 12056 [details]
Dissector patch


Also there is some "warning" with Clang build :
packet-kt.c:476:3: warning: Value stored to 'pi' is never read
                pi = proto_tree_add_item(rec_tree, hf_kt_key_str, tvb, *offset,
ksiz, ENC_ASCII);
                ^   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packet-kt.c:480:3: warning: Value stored to 'pi' is never read
                pi = proto_tree_add_item(rec_tree, hf_kt_val_str, tvb, *offset,
vsiz, ENC_ASCII);
                ^   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
packet-kt.c:569:6: warning: Value stored to 'ti' is never read
            ti = proto_tree_add_uint(kt_tree, hf_kt_magic, tvb, 0, 1, magic);
            ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Also with fix-encoding tools
 ./tools/fix-encoding-args.pl epan/dissectors/packet-kt.c 
epan/dissectors/packet-kt.c:  FT_STRING:        proto_tree_add_item(tree,
hf_kt_name, tvb, *offset, nsiz, [[ENC_NA]-->[ENC_ASCII|ENC_NA]]);
epan/dissectors/packet-kt.c:  FT_STRING:        proto_tree_add_item(rec_tree,
hf_kt_val_str, tvb, *offset, vsiz, [[ENC_ASCII]-->[ENC_ASCII|ENC_NA]]);
epan/dissectors/packet-kt.c:  FT_STRING:        proto_tree_add_item(rec_tree,
hf_kt_val_str, tvb, *offset, vsiz, [[ENC_ASCII]-->[ENC_ASCII|ENC_NA]]);
epan/dissectors/packet-kt.c:  FT_STRING:        proto_tree_add_item(rec_tree,
hf_kt_val_str, tvb, *offset, vsiz, [[ENC_ASCII]-->[ENC_ASCII|ENC_NA]]);


Also it is prefered to use proto_tree_add_item rather proto_tree_add_* (when it
is possible)
no need to declare local variable (dbidx, ksiz, vsiz...)


You are receiving this mail because:
  • You are watching all bug changes.