diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-13 19:48:22 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-14 10:51:46 +0000 |
commit | 81beae97c315e031829e04610ed56d1945fd2c96 (patch) | |
tree | 84510c37834c9f62adf395a7c91aaa2281ca7c1d /epan/proto.c | |
parent | 1565910126e23d029abe845635be155209c5844a (diff) |
proto.c: Unsigned fields should use %u within printf.
Found by VS Code Analysis
Change-Id: I76ea860cd86b41ef33c47dcc8f6b1c122f8bb668
Reviewed-on: https://code.wireshark.org/review/16424
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/proto.c b/epan/proto.c index 04eb5c3cf4..07574aa324 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -8409,21 +8409,21 @@ proto_registrar_dump_fieldcount(void) same_name_count++; } - printf ("There are %d header fields registered, of which:\n" - "\t%d are deregistered\n" - "\t%d are protocols\n" - "\t%d have the same name as another field\n\n", + printf ("There are %u header fields registered, of which:\n" + "\t%u are deregistered\n" + "\t%u are protocols\n" + "\t%u have the same name as another field\n\n", gpa_hfinfo.len, deregistered_count, protocol_count, same_name_count); - printf ("%d fields were pre-allocated.\n%s", PROTO_PRE_ALLOC_HF_FIELDS_MEM, + printf ("%u fields were pre-allocated.\n%s", PROTO_PRE_ALLOC_HF_FIELDS_MEM, (gpa_hfinfo.allocated_len > PROTO_PRE_ALLOC_HF_FIELDS_MEM) ? "* * Please increase PROTO_PRE_ALLOC_HF_FIELDS_MEM (in epan/proto.c)! * *\n\n" : "\n"); - printf ("The header field table consumes %d KiB of memory.\n", + printf ("The header field table consumes %u KiB of memory.\n", (int)(gpa_hfinfo.allocated_len * sizeof(header_field_info *) / 1024)); - printf ("The fields themselves consume %d KiB of memory.\n", + printf ("The fields themselves consume %u KiB of memory.\n", (int)(gpa_hfinfo.len * sizeof(header_field_info) / 1024)); return (gpa_hfinfo.allocated_len > PROTO_PRE_ALLOC_HF_FIELDS_MEM); |