diff --git a/color_filters.c b/color_filters.c index b9a0429333..0cb8e6b57a 100644 --- a/color_filters.c +++ b/color_filters.c @@ -712,7 +712,7 @@ write_filter(gpointer filter_arg, gpointer data_arg) if ( (colorf->selected || !data->only_selected) && (strstr(colorf->filter_name,CONVERSATION_COLOR_PREFIX)==NULL) ) { - fprintf(f,"%s@%s@%s@[%d,%d,%d][%d,%d,%d]\n", + fprintf(f,"%s@%s@%s@[%u,%u,%u][%u,%u,%u]\n", colorf->disabled ? "!" : "", colorf->filter_name, colorf->filter_text, diff --git a/dumpcap.c b/dumpcap.c index fa845b9c63..7664a777b9 100644 --- a/dumpcap.c +++ b/dumpcap.c @@ -1583,7 +1583,7 @@ report_capture_count(gboolean reportit) { /* Don't print this if we're a capture child. */ if (!capture_child && reportit) { - fprintf(stderr, "\rPackets captured: %u\n", global_ld.packet_count); + fprintf(stderr, "\rPackets captured: %d\n", global_ld.packet_count); /* stderr could be line buffered */ fflush(stderr); } @@ -4981,7 +4981,7 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level, level = "Dbg "; break; default: - fprintf(stderr, "unknown log_level %u\n", log_level); + fprintf(stderr, "unknown log_level %d\n", log_level); level = NULL; g_assert_not_reached(); } diff --git a/epan/dfilter/dfvm.c b/epan/dfilter/dfvm.c index 2ce422c5d8..0cd3fee6bd 100644 --- a/epan/dfilter/dfvm.c +++ b/epan/dfilter/dfvm.c @@ -273,12 +273,12 @@ dfvm_dump(FILE *f, dfilter_t *df) break; case IF_TRUE_GOTO: - fprintf(f, "%05d IF-TRUE-GOTO\t%d\n", + fprintf(f, "%05d IF-TRUE-GOTO\t%u\n", id, arg1->value.numeric); break; case IF_FALSE_GOTO: - fprintf(f, "%05d IF-FALSE-GOTO\t%d\n", + fprintf(f, "%05d IF-FALSE-GOTO\t%u\n", id, arg1->value.numeric); break; diff --git a/epan/dfilter/gencode.c b/epan/dfilter/gencode.c index e9eb2235b5..90ab7e2f9a 100644 --- a/epan/dfilter/gencode.c +++ b/epan/dfilter/gencode.c @@ -310,7 +310,7 @@ gen_entity(dfwork_t *dfw, stnode_t *st_arg, dfvm_value_t **p_jmp) reg = dfw_append_function(dfw, st_arg, p_jmp); } else { - printf("sttype_id is %u\n", e_type); + printf("sttype_id is %u\n", (unsigned)e_type); g_assert_not_reached(); } return reg; diff --git a/epan/except.c b/epan/except.c index 0efe53b45d..2e79f902c0 100644 --- a/epan/except.c +++ b/epan/except.c @@ -216,11 +216,11 @@ G_GNUC_NORETURN WS_MSVC_NORETURN static void do_throw(except_t *except) static void unhandled_catcher(except_t *except) { if (except->except_message == NULL) { - fprintf(stderr, "Unhandled exception (group=%ld, code=%ld)\n", + fprintf(stderr, "Unhandled exception (group=%lu, code=%lu)\n", except->except_id.except_group, except->except_id.except_code); } else { - fprintf(stderr, "Unhandled exception (\"%s\", group=%ld, code=%ld)\n", + fprintf(stderr, "Unhandled exception (\"%s\", group=%lu, code=%lu)\n", except->except_message, except->except_id.except_group, except->except_id.except_code); } diff --git a/epan/ftypes/ftype-integer.c b/epan/ftypes/ftype-integer.c index 0b0dd698f9..ee11d17fc0 100644 --- a/epan/ftypes/ftype-integer.c +++ b/epan/ftypes/ftype-integer.c @@ -478,7 +478,7 @@ integer64_repr_len(fvalue_t *fv _U_, ftrepr_t rtype _U_, int field_display _U_) static void integer64_to_repr(fvalue_t *fv, ftrepr_t rtype _U_, int field_display _U_, char *buf) { - sprintf(buf, "%" G_GINT64_MODIFIER "d", fv->value.integer64); + sprintf(buf, "%" G_GINT64_MODIFIER "d", (gint64)fv->value.integer64); } static int diff --git a/epan/oids.c b/epan/oids.c index 7489b2792c..6c7d916568 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -569,9 +569,9 @@ static void register_mibs(void) { } else { char* mod_name = smiLoadModule(smi_modules[i].name); if (mod_name) - D(2,("Loaded: '%s'[%d] as %s",smi_modules[i].name,i,mod_name )); + D(2,("Loaded: '%s'[%u] as %s",smi_modules[i].name,i,mod_name )); else - D(1,("Failed to load: '%s'[%d]",smi_modules[i].name,i)); + D(1,("Failed to load: '%s'[%u]",smi_modules[i].name,i)); } } @@ -722,7 +722,7 @@ static void register_mibs(void) { /* HFILL */ HFILL_INIT(hf); - D(5,("\t\t\tIndex: name=%s subids=%d key_type=%d", + D(5,("\t\t\tIndex: name=%s subids=%u key_type=%d", key->name, key->num_subids, key->key_type )); if (key->hfid == -2) { @@ -889,7 +889,7 @@ static guint check_num_oid(const char* str) { if (!r) return 0; do { - D(9,("\tcheck_num_oid: '%c' %d",*r,n)); + D(9,("\tcheck_num_oid: '%c' %u",*r,n)); switch(*r) { case '.': case '\0': n++; diff --git a/epan/print.c b/epan/print.c index fca9c2d4a0..575ef52a11 100644 --- a/epan/print.c +++ b/epan/print.c @@ -540,29 +540,29 @@ print_pdml_geninfo(proto_tree *tree, FILE *fh) /* Print geninfo start */ fprintf(fh, - " \n", + " \n", frame_finfo->length); /* Print geninfo.num */ fprintf(fh, - " \n", + " \n", num, num, frame_finfo->length); /* Print geninfo.len */ fprintf(fh, - " \n", + " \n", len, len, frame_finfo->length); /* Print geninfo.caplen */ fprintf(fh, - " \n", + " \n", caplen, caplen, frame_finfo->length); tmp = abs_time_to_str(NULL, timestamp, ABSOLUTE_TIME_LOCAL, TRUE); /* Print geninfo.timestamp */ fprintf(fh, - " \n", + " \n", tmp, (int) timestamp->secs, timestamp->nsecs, frame_finfo->length); wmem_free(NULL, tmp); diff --git a/epan/proto.c b/epan/proto.c index eea584f8c5..608a7f8639 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -7118,7 +7118,7 @@ proto_registrar_dump_values(void) continue; } try_val_to_str_ext(0, vse_p); /* "prime" the extended value_string */ - printf("E\t%s\t%d\t%s\t%s\n", + printf("E\t%s\t%u\t%s\t%s\n", hfinfo->abbrev, VALUE_STRING_EXT_VS_NUM_ENTRIES(vse_p), VALUE_STRING_EXT_VS_NAME(vse_p), diff --git a/mergecap.c b/mergecap.c index a8f7daa4ef..3f345be9d4 100644 --- a/mergecap.c +++ b/mergecap.c @@ -479,7 +479,7 @@ main(int argc, char *argv[]) } if (verbose) - fprintf(stderr, "Record: %u\n", count++); + fprintf(stderr, "Record: %d\n", count++); /* We simply write it, perhaps after truncating it; we could do other * things, like modify it. */ diff --git a/plugins/wimaxasncp/packet-wimaxasncp.c b/plugins/wimaxasncp/packet-wimaxasncp.c index 36f7966fae..15f9350dd4 100644 --- a/plugins/wimaxasncp/packet-wimaxasncp.c +++ b/plugins/wimaxasncp/packet-wimaxasncp.c @@ -3333,7 +3333,7 @@ register_wimaxasncp_fields(const char* unused _U_) { printf( "%s\n" - " type = %d\n" + " type = %u\n" " description = %s\n" " decoder = %s\n" " hf_root = %d\n" diff --git a/text2pcap.c b/text2pcap.c index 951db9659c..3f22c0c397 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -1907,7 +1907,7 @@ parse_options (int argc, char *argv[]) hdr_src_port, hdr_dest_port); if (hdr_sctp) fprintf(stderr, "Generate dummy SCTP header: Source port: %u. Dest port: %u. Tag: %u\n", hdr_sctp_src, hdr_sctp_dest, hdr_sctp_tag); - if (hdr_data_chunk) fprintf(stderr, "Generate dummy DATA chunk header: TSN: %u. SID: %d. SSN: %d. PPID: %u\n", + if (hdr_data_chunk) fprintf(stderr, "Generate dummy DATA chunk header: TSN: %u. SID: %u. SSN: %u. PPID: %u\n", hdr_data_chunk_tsn, hdr_data_chunk_sid, hdr_data_chunk_ssn, hdr_data_chunk_ppid); } } diff --git a/ui/cli/tap-afpstat.c b/ui/cli/tap-afpstat.c index a146223690..f6bfb82aa9 100644 --- a/ui/cli/tap-afpstat.c +++ b/ui/cli/tap-afpstat.c @@ -96,7 +96,7 @@ afpstat_draw(void *pss) } tmp_str = val_to_str_ext_wmem(NULL, i, &CommandCode_vals_ext, "Unknown (%u)"); - printf("%-25s %6d %3d.%05d %3d.%05d %3" G_GINT64_MODIFIER "u.%05" G_GINT64_MODIFIER "u\n", + printf("%-25s %6u %3d.%05d %3d.%05d %3" G_GINT64_MODIFIER "u.%05" G_GINT64_MODIFIER "u\n", tmp_str, ss->proc[i].num, (int)ss->proc[i].min.secs, ss->proc[i].min.nsecs/10000, diff --git a/ui/cli/tap-camelcounter.c b/ui/cli/tap-camelcounter.c index 0eb40de997..e0bca3263c 100644 --- a/ui/cli/tap-camelcounter.c +++ b/ui/cli/tap-camelcounter.c @@ -79,7 +79,7 @@ static void camelcounter_draw(void *phs) tmp_str = val_to_str_wmem(NULL, i, camel_opr_code_strings, "Unknown message (%d)"); printf("%30s ", tmp_str); wmem_free(NULL, tmp_str); - printf("%6d\n", p_counter->camel_msg[i]); + printf("%6u\n", p_counter->camel_msg[i]); } } /* Message Type */ printf("------------------------------------------\n"); diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c index 7d2ab8d470..73aaff2073 100644 --- a/ui/cli/tap-camelsrt.c +++ b/ui/cli/tap-camelsrt.c @@ -124,7 +124,7 @@ static void camelsrt_draw(void *phs) if (hs->stats[j].num == 0) { tmp_str = val_to_str_wmem(NULL, j, camelSRTtype_naming, "Unknown Message 0x%02x"); printf("|%24s |%8u |%8.2f ms|%8.2f ms|%8.2f ms|%10u |%10u |\n", - tmp_str, 0, 0.0, 0.0, 0.0, 0, 0); + tmp_str, 0U, 0.0, 0.0, 0.0, 0U, 0U); wmem_free(NULL, tmp_str); continue; } diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 3d85d4ff09..d98fee2103 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -398,11 +398,11 @@ call_foreach_print_ip_tree(gpointer key _U_, gpointer value, gpointer user_data) if (show_it) { if (fInfo->fp->count < MERGED_FILES) { - printf("Packet id :%i, count:%i Problem:", fInfo->id, fInfo->fp->count); + printf("Packet id :%u, count:%u Problem:", fInfo->id, fInfo->fp->count); printf("Packet lost\n"); } if (fInfo->fp->count > MERGED_FILES) { - printf("Packet id :%i, count:%i Problem:", fInfo->id, fInfo->fp->count); + printf("Packet id :%u, count:%u Problem:", fInfo->id, fInfo->fp->count); printf("More than two packets\n"); if (fInfo->fp->cksum == WRONG_CHKSUM) { printf("Checksum error over IP header\n"); @@ -410,7 +410,7 @@ call_foreach_print_ip_tree(gpointer key _U_, gpointer value, gpointer user_data) } if (fInfo->fp->count == MERGED_FILES) { if (fInfo->fp->cksum == WRONG_CHKSUM) { - printf("Packet id :%i, count:%i Problem:", fInfo->id, fInfo->fp->count); + printf("Packet id :%u, count:%u Problem:", fInfo->id, fInfo->fp->count); printf("Checksum error over IP header\n"); if (((delta < (average-cs->stats.variance)) || (delta > (average+cs->stats.variance))) && (delta > 0.0) && (cs->stats.variance != 0)) { printf("Not arrived in time\n"); @@ -419,13 +419,13 @@ call_foreach_print_ip_tree(gpointer key _U_, gpointer value, gpointer user_data) printf("Not correct order\n"); } } else if (((delta < (average-cs->stats.variance)) || (delta > (average+cs->stats.variance))) && (delta > 0.0) && (cs->stats.variance != 0)) { - printf("Packet id :%i, count:%i Problem:", fInfo->id, fInfo->fp->count); + printf("Packet id :%u, count:%u Problem:", fInfo->id, fInfo->fp->count); printf("Package not arrived in time\n"); if ((nstime_cmp(&fInfo->fp->predecessor_time, &fInfo->zebra_time) > 0 || nstime_cmp(&fInfo->fp->partner->fp->predecessor_time, &fInfo->fp->partner->zebra_time) > 0) && fInfo->zebra_time.nsecs != MERGED_FILES && ON_method) { printf("Not correct order\n"); } } else if ((nstime_cmp(&fInfo->fp->predecessor_time, &fInfo->zebra_time) > 0 || nstime_cmp(&fInfo->fp->partner->fp->predecessor_time, &fInfo->fp->partner->zebra_time) > 0) && fInfo->zebra_time.nsecs != MERGED_FILES && ON_method) { - printf("Packet id :%i, count:%i Problem:", fInfo->id, fInfo->fp->count); + printf("Packet id :%u, count:%u Problem:", fInfo->id, fInfo->fp->count); printf("Not correct order\n"); } } diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c index 54900cf64b..c93b1744d7 100644 --- a/ui/cli/tap-diameter-avp.c +++ b/ui/cli/tap-diameter-avp.c @@ -186,7 +186,7 @@ diameteravp_packet(void *pds, packet_info *pinfo, epan_dissect_t *edt _U_, const ds->paired_ans_count++; } /* Output frame data.*/ - printf("frame='%d' time='%f' src='%s' srcport='%d' dst='%s' dstport='%d' proto='diameter' msgnr='%d' is_request='%d' cmd='%d' req_frame='%d' ans_frame='%d' resp_time='%f' ", + printf("frame='%u' time='%f' src='%s' srcport='%u' dst='%s' dstport='%u' proto='diameter' msgnr='%u' is_request='%d' cmd='%u' req_frame='%u' ans_frame='%u' resp_time='%f' ", pinfo->fd->num, nstime_to_sec(&pinfo->fd->abs_ts), address_to_str(pinfo->pool, &pinfo->src), pinfo->srcport, address_to_str(pinfo->pool, &pinfo->dst), pinfo->destport, ds->diammsg_toprocess, is_request, cmd_code, req_frame, ans_frame, resp_time); /* Visit selected nodes of one diameter message.*/ tree_traverse_pre_order(current, diam_tree_to_csv, &ds); @@ -205,7 +205,7 @@ diameteravp_draw(void *pds) { diameteravp_t *ds = (diameteravp_t *)pds; /* printing results */ - printf("=== Diameter Summary ===\nrequset count:\t%d\nanswer count:\t%d\nreq/ans pairs:\t%d\n", ds->req_count, ds->ans_count, ds->paired_ans_count); + printf("=== Diameter Summary ===\nrequset count:\t%u\nanswer count:\t%u\nreq/ans pairs:\t%u\n", ds->req_count, ds->ans_count, ds->paired_ans_count); } diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c index f90002ad2b..4acdcd1692 100644 --- a/ui/cli/tap-expert.c +++ b/ui/cli/tap-expert.c @@ -159,7 +159,7 @@ static void draw_items_for_severity(GArray *items, const gchar *label) } /* Title */ - printf("\n%s (%u)\n", label, total); + printf("\n%s (%d)\n", label, total); printf("=============\n"); /* Column headings */ @@ -169,7 +169,7 @@ static void draw_items_for_severity(GArray *items, const gchar *label) for (n=0; n < items->len; n++) { ei = &g_array_index(items, expert_entry, n); tmp_str = val_to_str_wmem(NULL, ei->group, expert_group_vals, "Unknown (%d)"); - printf("%12u %10s %18s %s\n", + printf("%12d %10s %18s %s\n", ei->frequency, tmp_str, ei->protocol, ei->summary); diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index 9646cc7923..d9f4f0d610 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -596,11 +596,11 @@ followDraw( address_to_str_buf(addr[node], buf, sizeof buf); if (addr[node]->type == AT_IPv6) { - printf("Node %u: [%s]:%d\n", node, buf, port[node]); + printf("Node %d: [%s]:%d\n", node, buf, port[node]); } else { - printf("Node %u: %s:%d\n", node, buf, port[node]); + printf("Node %d: %s:%d\n", node, buf, port[node]); } } @@ -632,7 +632,7 @@ followDraw( break; case mode_ASCII: - printf("%s%d\n", node ? "\t" : "", sc.dlen); + printf("%s%u\n", node ? "\t" : "", sc.dlen); break; case mode_RAW: diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c index 6b72c3a833..e175a9be6a 100644 --- a/ui/cli/tap-iostat.c +++ b/ui/cli/tap-iostat.c @@ -891,7 +891,7 @@ iostat_draw(void *arg) else spaces_s = &spaces[borderlen - col_w[j].val]; - printf("%-2u%s|", j+1, spaces_s); + printf("%-2d%s|", j+1, spaces_s); } if (tabrow_w < borderlen) { filler_s = &spaces[tabrow_w+1]; diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c index 178892ccdb..292e83f8a8 100644 --- a/ui/cli/tap-protohierstat.c +++ b/ui/cli/tap-protohierstat.c @@ -145,7 +145,7 @@ phs_draw(phs_t *rs, int indentation) stroff += g_snprintf(str+stroff, MAXPHSLINE-stroff, " "); } g_snprintf(str+stroff, MAXPHSLINE-stroff, "%s", rs->proto_name); - printf("%-40s frames:%d bytes:%" G_GINT64_MODIFIER "d\n", str, rs->frames, rs->bytes); + printf("%-40s frames:%u bytes:%" G_GINT64_MODIFIER "u\n", str, rs->frames, rs->bytes); phs_draw(rs->child, indentation+1); } } diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c index 611abf5894..6d7c1ceaa7 100644 --- a/ui/cli/tap-rpcprogs.c +++ b/ui/cli/tap-rpcprogs.c @@ -193,7 +193,7 @@ rpcprogs_draw(void *dummy _U_) td = ((td / rp->num) + 500) / 1000; g_snprintf(str, sizeof(str), "%s(%d)", rpc_prog_name(rp->program), rp->program); - printf("%-15s %2d %6d %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u\n", + printf("%-15s %2u %6d %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u\n", str, rp->version, rp->num, diff --git a/ui/cli/tap-rpcstat.c b/ui/cli/tap-rpcstat.c index b17fed7cd9..9a74c7bda6 100644 --- a/ui/cli/tap-rpcstat.c +++ b/ui/cli/tap-rpcstat.c @@ -199,7 +199,7 @@ rpcstat_draw(void *prs) guint64 td; printf("\n"); printf("==================================================================\n"); - printf("%s Version %d SRT Statistics:\n", rs->prog, rs->version); + printf("%s Version %u SRT Statistics:\n", rs->prog, rs->version); printf("Filter: %s\n", rs->filter ? rs->filter : ""); printf("Procedure Calls Min SRT Max SRT Avg SRT Total\n"); for (i=0; inum_procedures; i++) { @@ -298,8 +298,8 @@ rpcstat_init(const char *opt_arg, void *userdata _U_) rpc_max_proc = -1; g_hash_table_foreach(rpc_procs, (GHFunc)rpcstat_find_procs, NULL); if (rpc_min_proc == -1) { - fprintf(stderr, "tshark: Invalid -z rpc,srt,%d,%d\n", rpc_program, rpc_version); - fprintf(stderr, " Program:%d version:%d isn't supported by tshark.\n", rpc_program, rpc_version); + fprintf(stderr, "tshark: Invalid -z rpc,srt,%u,%u\n", rpc_program, rpc_version); + fprintf(stderr, " Program:%u version:%u isn't supported by tshark.\n", rpc_program, rpc_version); exit(1); } diff --git a/ui/cli/tap-scsistat.c b/ui/cli/tap-scsistat.c index 8160e4e899..6bfe84f947 100644 --- a/ui/cli/tap-scsistat.c +++ b/ui/cli/tap-scsistat.c @@ -58,7 +58,8 @@ typedef struct _scsistat_t { scsi_procedure_t *procedures; } scsistat_t; -#define NANOSECS_PER_SEC 1000000000 +#define MICROSECS_PER_SEC 1000000 +#define NANOSECS_PER_SEC 1000000000 static void scsistat_reset(void *prs) @@ -153,14 +154,14 @@ scsistat_draw(void *prs) td = ((guint64)(rs->procedures[i].tot.secs)) * NANOSECS_PER_SEC + rs->procedures[i].tot.nsecs; td = ((td / rs->procedures[i].num) + 500) / 1000; - printf("%-19s %6d %3d.%06u %3d.%06u %3d.%06u \n", + printf("%-19s %6d %3d.%06d %3d.%06d %3u.%06u \n", rs->procedures[i].proc, rs->procedures[i].num, (int)(rs->procedures[i].min.secs), (rs->procedures[i].min.nsecs+500)/1000, (int)(rs->procedures[i].max.secs), (rs->procedures[i].max.nsecs+500)/1000, - (int)(td/1000000), (int)(td%1000000) + (td/MICROSECS_PER_SEC), (td%MICROSECS_PER_SEC) ); } printf("===========================================================\n"); diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c index e8e0271f61..d12d620365 100644 --- a/ui/cli/tap-sipstat.c +++ b/ui/cli/tap-sipstat.c @@ -375,15 +375,15 @@ sipstat_draw(void *psp ) else printf("SIP Statistics with filter %s\n", sp->filter); - printf("\nNumber of SIP messages: %d", sp->packets); - printf("\nNumber of resent SIP messages: %d\n", sp->resent_packets); + printf("\nNumber of SIP messages: %u", sp->packets); + printf("\nNumber of resent SIP messages: %u\n", sp->resent_packets); printf( "\n* SIP Status Codes in reply packets\n"); g_hash_table_foreach(sp->hash_responses, (GHFunc)sip_draw_hash_responses, (gpointer)" SIP %3d %-15s : %5d Packets\n"); printf("\n* List of SIP Request methods\n"); g_hash_table_foreach(sp->hash_requests, (GHFunc)sip_draw_hash_requests, (gpointer)" %-15s : %5d Packets\n"); - printf( "\n* Average setup time %d ms\n Min %d ms\n Max %d ms\n", sp->average_setup_time, sp->min_setup_time, sp->max_setup_time); + printf( "\n* Average setup time %u ms\n Min %u ms\n Max %u ms\n", sp->average_setup_time, sp->min_setup_time, sp->max_setup_time); printf("===================================================================\n"); } diff --git a/ui/cli/tap-smbstat.c b/ui/cli/tap-smbstat.c index 6142d28755..a8cd9667a4 100644 --- a/ui/cli/tap-smbstat.c +++ b/ui/cli/tap-smbstat.c @@ -129,7 +129,7 @@ smbstat_draw(void *pss) td = ((td / ss->proc[i].num) + 500) / 1000; tmp_str = val_to_str_ext_wmem(NULL, i, &smb_cmd_vals_ext, "Unknown (0x%02x)"); - printf("%-25s %6d %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u\n", + printf("%-25s %6u %3d.%06d %3d.%06d %3" G_GINT64_MODIFIER "u.%06" G_GINT64_MODIFIER "u\n", tmp_str, ss->proc[i].num, (int)(ss->proc[i].min.secs), (ss->proc[i].min.nsecs+500)/1000, diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c index 8c882bbfe9..eb06a67d88 100644 --- a/ui/cli/tap-wspstat.c +++ b/ui/cli/tap-wspstat.c @@ -187,10 +187,10 @@ wspstat_draw(void *psp) for (i=1; i <= ((sp->num_pdus+1)/2); i++) { guint32 ii = i+sp->num_pdus/2; - printf("%-23s %9d", sp->pdu_stats[i ].type, sp->pdu_stats[i ].packets); + printf("%-23s %9u", sp->pdu_stats[i ].type, sp->pdu_stats[i ].packets); printf(" || "); if (ii< (sp->num_pdus) ) - printf("%-23s %9d\n", sp->pdu_stats[ii].type, sp->pdu_stats[ii].packets); + printf("%-23s %9u\n", sp->pdu_stats[ii].type, sp->pdu_stats[ii].packets); else printf("\n"); } diff --git a/ui/console.c b/ui/console.c index f36a0ec604..94c6e5ac3f 100644 --- a/ui/console.c +++ b/ui/console.c @@ -83,7 +83,7 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level, level = "Dbg "; break; default: - fprintf(stderr, "unknown log_level %u\n", log_level); + fprintf(stderr, "unknown log_level %d\n", log_level); level = NULL; g_assert_not_reached(); } @@ -92,7 +92,7 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level, time(&curr); today = localtime(&curr); - fprintf(stderr, "%02u:%02u:%02u %8s %s %s\n", + fprintf(stderr, "%02d:%02d:%02d %8s %s %s\n", today->tm_hour, today->tm_min, today->tm_sec, log_domain != NULL ? log_domain : "", level, message); diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index 3b0323dcab..4f9d2c16b1 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -1253,7 +1253,7 @@ static void draw_element_line(struct graph *g, struct element *e, cairo_t *cr, int xx1, xx2, yy1, yy2; debug(DBS_GRAPH_DRAWING) - printf("\nline element: (%.2f,%.2f)->(%.2f,%.2f), seg %d ...\n", + printf("\nline element: (%.2f,%.2f)->(%.2f,%.2f), seg %u ...\n", e->p.line.dim.x1, e->p.line.dim.y1, e->p.line.dim.x2, e->p.line.dim.y2, e->parent->num); diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 79f27cea4b..c67fdfba22 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -2013,7 +2013,7 @@ static void draw_element_line(struct gtk_graph *g, struct element *e, cairo_t *c int xx1, xx2, yy1, yy2; debug(DBS_GRAPH_DRAWING) printf("line element: (%.2f,%.2f)->(%.2f,%.2f), " - "seg %d ... ", e->p.line.dim.x1, e->p.line.dim.y1, + "seg %u ... ", e->p.line.dim.x1, e->p.line.dim.y1, e->p.line.dim.x2, e->p.line.dim.y2, e->parent->num); /* Set our new colour (if changed) */ diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 57a8aa0419..442ddac1c0 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -1942,7 +1942,7 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) { if (range->remove_ignored && g_cf->current_frame && g_cf->current_frame->flags.ignored) { StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("0")); } else { - StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), selected_num ? 1 : 0); + StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), selected_num ? 1 : 0); } SetWindowText(cur_ctrl, static_val); @@ -1951,7 +1951,7 @@ range_update_dynamics(HWND dlg_hwnd, packet_range_t *range) { if (range->remove_ignored && g_cf->current_frame && g_cf->current_frame->flags.ignored) { StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("0")); } else { - StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%u"), selected_num ? 1 : 0); + StringCchPrintf(static_val, STATIC_LABEL_CHARS, _T("%d"), selected_num ? 1 : 0); } SetWindowText(cur_ctrl, static_val);