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>
This commit is contained in:
Michael Mann 2017-03-26 19:23:08 -04:00
parent 677e103d10
commit ebc6dfa6de
1 changed files with 9 additions and 9 deletions

View File

@ -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: