From eb5558f9e778cff4a7f9effdfc76c8de79ab4422 Mon Sep 17 00:00:00 2001 From: John Cox Date: Fri, 15 Apr 2011 16:10:29 +0100 Subject: [PATCH] Silence some warnings --- pcapreport.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 pcapreport.c diff --git a/pcapreport.c b/pcapreport.c old mode 100644 new mode 100755 index 90e35ae..98d95d4 --- a/pcapreport.c +++ b/pcapreport.c @@ -521,7 +521,8 @@ static int digest_times(pcapreport_ctx_t *ctx, } fprintf(st->csv_file, "\"PKT\",\"Time\",\"PCR\",\"Skew\",\"Jitter\"\n"); } - fprintf(st->csv_file, "%d,%llu,%llu,%lld,%u\n", ctx->pkt_counter, t_pcr - ctx->time_start, pcr, skew, cur_jitter); + fprintf(st->csv_file, "%d," LLU_FORMAT "," LLU_FORMAT "," LLD_FORMAT ",%u\n", ctx->pkt_counter, + t_pcr - ctx->time_start, pcr, skew, cur_jitter); } // Remember where we are for posterity @@ -821,15 +822,15 @@ stream_close(pcapreport_ctx_t * const ctx, pcapreport_stream_t ** pst) } static int -ip_reassemble(pcapreport_reassembly_t * const reas, const ipv4_header_t * const ip, void * const in_data, - void ** const out_pdata, uint32_t * const out_plen) +ip_reassemble(pcapreport_reassembly_t * const reas, const ipv4_header_t * const ip, byte * const in_data, + byte ** const out_pdata, uint32_t * const out_plen) { uint32_t frag_len = ip->length - ip->hdr_length * 4; uint32_t frag_offset = ip->frag_offset * 8; // bytes int frag_final = (ip->flags & 1) == 0; // Discard unless we succeed - *out_pdata = NULL; + *out_pdata = (void *)NULL; *out_plen = 0; if (frag_final && frag_offset == 0) @@ -1377,7 +1378,7 @@ int main(int argc, char **argv) data = &data[out_st]; len = out_len; - if (ip_reassemble(&ctx->reassembly_env, &ipv4_hdr, data, (void**)&data, &len) != 0) + if (ip_reassemble(&ctx->reassembly_env, &ipv4_hdr, data, &data, &len) != 0) { goto dump_out; }