diff options
author | Michael Mann <mmann78@netscape.net> | 2017-03-26 19:23:08 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-03-27 03:13:23 +0000 |
commit | ebc6dfa6ded7944cdea5f6ec05e2d73018e37203 (patch) | |
tree | df4939cf6ea1cb9d04e09eb5e86a7c8f00c5f65c /sharkd_session.c | |
parent | 677e103d1076760139b7b53527cac55f3ace55b3 (diff) |
sharkd_session.c: Match printf argument with datatype
Address complaints from vscodeanalysis.
Change-Id: I0943a635eb0904a5ee392f772aa21cc3b56bc3de
Reviewed-on: https://code.wireshark.org/review/20728
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'sharkd_session.c')
-rw-r--r-- | sharkd_session.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sharkd_session.c b/sharkd_session.c index 97929f30fe..1dc9df01b7 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -498,7 +498,7 @@ sharkd_session_process_load(const char *buf, const jsmntok_t *tokens, int count) static void sharkd_session_process_status(void) { - printf("{\"frames\":%d", cfile.count); + printf("{\"frames\":%u", cfile.count); printf("}\n"); } @@ -568,7 +568,7 @@ sharkd_session_process_analyse(void) analyser.last_time = NULL; analyser.protocols_set = g_hash_table_new(NULL /* g_direct_hash() */, NULL /* g_direct_equal */); - printf("{\"frames\":%d", cfile.count); + printf("{\"frames\":%u", cfile.count); printf(",\"protocols\":["); for (framenum = 1; framenum <= cfile.count; framenum++) @@ -677,12 +677,12 @@ sharkd_session_process_tap_stats_node_cb(const stat_node *n) { /* code based on stats_tree_get_values_from_node() */ printf("%s{\"name\":\"%s\"", sepa, node->name); - printf(",\"count\":%u", node->counter); + printf(",\"count\":%d", node->counter); if (node->counter && ((node->st_flags & ST_FLG_AVERAGE) || node->rng)) { printf(",\"avg\":%.2f", ((float)node->total) / node->counter); - printf(",\"min\":%u", node->minvalue); - printf(",\"max\":%u", node->maxvalue); + printf(",\"min\":%d", node->minvalue); + printf(",\"max\":%d", node->maxvalue); } if (node->st->elapsed) @@ -1427,7 +1427,7 @@ sharkd_session_process_tap_eo_cb(void *tapdata) printf(",\"_download\":\"%s_%d\"", object_list->type, i); - printf(",\"len\":%" G_GUINT64_FORMAT, eo_entry->payload_len); + printf(",\"len\":%" G_GINT64_FORMAT, eo_entry->payload_len); printf("}"); @@ -1987,10 +1987,10 @@ sharkd_session_process_frame_cb_tree(proto_tree *tree, tvbuff_t **tvbs) } if (finfo->start >= 0 && finfo->length > 0) - printf(",\"h\":[%u,%u]", finfo->start, finfo->length); + printf(",\"h\":[%d,%d]", finfo->start, finfo->length); if (finfo->appendix_start >= 0 && finfo->appendix_length > 0) - printf(",\"i\":[%u,%u]", finfo->appendix_start, finfo->appendix_length); + printf(",\"i\":[%d,%d]", finfo->appendix_start, finfo->appendix_length); if (finfo->hfinfo) @@ -2622,7 +2622,7 @@ sharkd_session_process_dumpconf_cb(pref_t *pref, gpointer d) case PREF_DECODE_AS_UINT: printf("\"u\":%u", prefs_get_uint_value_real(pref, pref_current)); if (prefs_get_uint_base(pref) != 10) - printf(",\"ub\":%d", prefs_get_uint_base(pref)); + printf(",\"ub\":%u", prefs_get_uint_base(pref)); break; case PREF_BOOL: |